OpenID Connect
Server-side OIDC
Rhea Key is a standard OpenID Connect provider. The issuer is always https://rheakey.com. Configure your library with the issuer or the discovery address and let it read the endpoints.
https://rheakey.com/.well-known/openid-configuration| Step | Endpoint (from discovery) |
|---|---|
| The person approves | https://rheakey.com/oauth/authorize |
| Your server exchanges the code | https://auth.rheakey.com/oidc/token |
| Signing keys | https://auth.rheakey.com/oidc/jwks |
| Profile | https://auth.rheakey.com/oidc/userinfo |
| Revoke and sign out | https://auth.rheakey.com/oidc/revoke, https://auth.rheakey.com/oidc/end-session |
Server endpoints live on auth.rheakey.com, but the issuer stays https://rheakey.com. Never set auth.rheakey.com as the issuer.
Issuer: https://rheakey.com
Discovery: https://rheakey.com/.well-known/openid-configuration
Flow: authorization code + PKCE (S256)
Scopes: openid profile
Token auth: client_secret_post (not Basic), or none for a public client
ID token: ES256
Claims: sub, rhea_address, preferred_username// auth.ts (Auth.js v5). Works today; no Rhea package needed.
// Callback: http://localhost:3000/api/auth/callback/rheakey
import NextAuth from "next-auth";
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [{
id: "rheakey",
name: "Rhea Key",
type: "oidc",
issuer: "https://rheakey.com",
clientId: process.env.RHEA_CLIENT_ID,
clientSecret: process.env.RHEA_CLIENT_SECRET,
checks: ["pkce", "state", "nonce"],
client: {
token_endpoint_auth_method: "client_secret_post",
id_token_signed_response_alg: "ES256",
},
}],
});Authorization uses the code flow with PKCE (S256). Verify the ID token on your server, then create your own session. Issue a new session id; never reuse the old one. Hardware assurance is not currently issued; do not treat a local device check as a hardware guarantee.
