Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Scopes & Claims

Scopes control what information your application can access. Claims are the individual pieces of data returned in tokens and from the UserInfo endpoint.

Available Scopes

ScopeRequiredDescription
openidYes (for OIDC)Enables OpenID Connect — returns an ID token with sub claim
profileNoAccess to name and picture claims
emailNoAccess to email and email_verified claims

Claims Reference

Always Included (in access tokens)

ClaimTypeDescription
issstringIssuer URL (https://aero2.dev)
substringUser ID (UUID)
audstringAudience (client ID or API identifier)
expnumberExpiration time (Unix timestamp)
iatnumberIssued at time (Unix timestamp)
jtistringUnique token identifier
token_usestringToken type: access, id, or session
scopestringGranted scopes

ID Token Additional Claims

ClaimScopeTypeDescription
nonceopenidstringValue from authorization request
auth_timeopenidnumberTime of authentication (Unix timestamp)
emailemailstringUser's email address
email_verifiedemailbooleanWhether email is verified
nameprofilestringUser's display name
pictureprofilestringURL to profile image

UserInfo Endpoint Claims

The /oauth2/userinfo endpoint returns claims based on granted scopes:

# With scope "openid profile email"
curl https://aero2.dev/oauth2/userinfo \
  -H "Authorization: Bearer <access_token>"
{
  "sub": "user-uuid",
  "name": "Jane Doe",
  "email": "jane@example.com",
  "email_verified": true,
  "picture": "https://avatars.githubusercontent.com/u/12345"
}

Requesting Scopes

Specify scopes as a space-separated string in the authorization request:

GET /oauth2/authorize
  ?scope=openid+profile+email
  &...