Cmine ID
Developers

Connect Cmine ID

Standard OpenID Connect: authorization code + PKCE. Every URL below is complete — copy it as-is.

My apps ›
Step 1

Register your app and get a client_id

Register an app

Give the app a name and a redirect URI. It must be HTTPS and is matched exactly — after a successful sign-in we will only ever return the user there. localhost may use HTTP for local development.

A newly registered app starts in review and cannot start a sign-in until an admin approves it. This is a baseline anti-abuse policy, not an option.

Step 2

Send the user to the authorization page

Generate a random code_verifier, then use its SHA-256 as the code_challenge. PKCE is mandatory for every client — public and confidential alike.

https://identity.chwjh.com/oauth/authorize
  ?response_type=code
  &client_id=YOUR_CLIENT_ID
  &redirect_uri=https://yourapp.com/callback
  &scope=openid profile email
  &state=RANDOM
  &code_challenge=BASE64URL(SHA256(verifier))
  &code_challenge_method=S256

After signing in, the browser returns to your redirect_uri with ?code=…&state=…. Check that state matches the one you sent before doing anything else.

Step 3

Exchange the code for tokens

curl -X POST https://identity.chwjh.com/oauth/token   -H 'content-type: application/x-www-form-urlencoded'   -d grant_type=authorization_code   -d code=THE_CODE   -d redirect_uri=https://yourapp.com/callback   -d client_id=YOUR_CLIENT_ID   -d code_verifier=THE_VERIFIER

You get an access_token (JWT, 1 hour), an id_token, and — only if you asked for offline_access — a refresh_token. Confidential clients send client_id:client_secret via HTTP Basic instead.

Step 4

Verify the token

Verify signatures locally against the JWKS on your own server. Apart from the JWKS itself (cache it for 5 minutes) this needs no round-trip to us.

// 1. Fetch the public keys (cache for 5 minutes)
GET https://identity.chwjh.com/.well-known/jwks.json

// 2. Match the JWT header's kid to a key and verify
// 3. Check iss / aud / exp
iss = https://identity.chwjh.com
aud = YOUR_CLIENT_ID

Signatures are EdDSA (primary) and RS256 (compatibility). Keys rotate, so always resolve by kid — never hard-code one.

Endpoints

Every URL

Interactive API docs ›
PurposeURL
Discovery documenthttps://identity.chwjh.com/.well-known/openid-configuration
JWKShttps://identity.chwjh.com/.well-known/jwks.json
AuthorizeGET https://identity.chwjh.com/oauth/authorize
Token exchangePOST https://identity.chwjh.com/oauth/token
User infoGET https://identity.chwjh.com/oauth/userinfo
IntrospectionPOST https://identity.chwjh.com/oauth/introspect
RevocationPOST https://identity.chwjh.com/oauth/revoke
OpenAPIhttps://identity.chwjh.com/openapi/identity-api.yaml
Scopes

What you can ask for

openidConfirms who the user is and returns an id_token. You almost always want this.
profileName and avatar.
emailEmail address and whether it is verified.
offline_accessRequired to receive a refresh_token — without it you get none.
entitlements:readRead the user's subscription status across Cmine products.