OPEN PLATFORM/   DEVELOPERS

OAuth 2.0 · OpenID Connect

One authorization. Connect your app.

Connect your application to AppHub sign-in.

Each brand site has its own account system.

Issuerhttps://jingweihub.com

My applications

Register an application name and HTTPS callback after sign-in. A confidential application’s client_secret is shown only once.

Sign in to register

Quick start

  1. Register an application

    Sign in, register your application, and save its client_id and HTTPS callback URL.

  2. Request authorization

    Start the Authorization Code flow with PKCE to request user consent.

  3. Exchange the code

    Exchange the returned code and code_verifier at the token endpoint.

  4. Create a session

    Read user information with the access token, create your application session, and revoke tokens when needed.

Endpoints

GET
/api/public/oauth/authorize
POST
/api/public/oauth/token
GET
/api/public/oauth/userinfo
POST
/api/public/oauth/revoke
GET
/api/public/oauth/jwks

Discovery/.well-known/openid-configuration

Authorization parameters

GET https://jingweihub.com/api/public/oauth/authorize

response_type
code
client_id
The client identifier assigned when you register your application.
redirect_uri
Must exactly match a registered HTTPS callback URL.
scope
openid email — openid is required; email is optional.
state / nonce
Generate random values for this request; validate state on the callback and nonce in the ID Token.
code_challenge
BASE64URL(SHA256(code_verifier))
code_challenge_method
S256
Exchange and refresh tokens

POST https://jingweihub.com/api/public/oauth/token

Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&code=...&redirect_uri=...&client_id=...&code_verifier=...

Confidential applications also submit client_secret; public applications omit it. Refresh with grant_type=refresh_token, refresh_token and the client parameters.

ID Tokens use RS256. Validate the signature, iss, aud, exp and the request nonce. iss is this page’s issuer, and aud is your client_id.

User information and revocation

GET https://jingweihub.com/api/public/oauth/userinfo

Authorization: Bearer <access_token>

Returns sub, username, preferred_username and name. Email claims are included only with the email scope and a linked email address. Passwords are never returned.

POST https://jingweihub.com/api/public/oauth/revoke

Submit token and client_id as form fields, plus client_secret for confidential applications. Revoke tokens and clear your application session on logout.