Documentation

User Information

Obtain identity claims after a successful OIDC login.

From the ID token

After token exchange, decode and verify the id_token. Use sub as the stable external user id in your database.

From UserInfo

Call the UserInfo endpoint when you need a fresh profile snapshot or when you did not retain ID token claims.

userinfo.ts
const res = await fetch("https://auth.rdnt.live/api/auth/oauth2/userinfo", {
  headers: { Authorization: `Bearer ${accessToken}` },
});

const profile = await res.json();
// {
//   sub: "...",
//   name?: "...",
//   picture?: "...",
//   email?: "...",
//   email_verified?: boolean,
//   discord_user_id?: "..."
// }

Claims and scopes

ScopeClaims
openidsub (required)
profilename, picture, given/family name
emailemail, email_verified
Note
When a user has linked Discord on Radiant Auth, responses may include the custom claim discord_user_id.

Local user records

Upsert a local user row keyed by sub on each successful login. Keep app-specific data in your database; treat Radiant Auth as the source of identity, not application state.