Overview
OAuth scopes define what information and capabilities your app can access. Ave supports standard OpenID Connect scopes plus additional scopes for extended functionality.Standard Scopes
These scopes are available to all OAuth apps:openid
Required for OpenID Connect authentication. Grants access to the
sub (subject) claim in the ID token.Grants access to:- Identity ID (
subclaim) - Issuer information (
issclaim)
profile
Grants access to the user’s basic profile information.Grants access to:UserInfo Response:
- Display name
- Handle (username)
- Avatar URL
Grants access to the user’s email address.Grants access to:UserInfo Response:
- Email address
offline_access
Grants a refresh token for obtaining new access tokens without user interaction.Grants access to:Use cases:
- Refresh token in token response
- Background data sync
- Long-lived sessions
- Mobile applications
Extended Scopes
These scopes require explicit app configuration:user_id
Grants access to the user’s permanent user ID (separate from identity ID).Requirements:Access Token JWT Claims:UserInfo Response:
- Your OAuth app must have
allowUserIdScope: true - User must authorize this scope
- User UUID (permanent across all identities)
Scope Validation
Ave validates scopes at multiple points:Authorization request
When the user authorizes your app, Ave checks that all requested scopes are in your app’s
allowedScopes configuration.Token exchange
When exchanging an authorization code, Ave verifies the scopes again to prevent tampering.
Token refresh
When refreshing tokens, the original scopes are maintained. You cannot request additional scopes during refresh.
Requesting Scopes
Authorization Request
Request scopes when building the authorization URL:Default Scopes
If no scopes are specified:- Default scopes:
["openid", "profile", "email"] - Configured in your OAuth app’s
allowedScopes
Space-Separated Format
Scopes can also be provided as a space-separated string:Checking Granted Scopes
From Token Response
From Access Token JWT
From UserInfo Endpoint
Scope Combinations
Recommended Combinations
Basic Profile
Full Profile
Long-Lived Session
User Tracking
Custom Resource Scopes
When creating delegation grants to other apps, you request custom scopes defined by the target resource:- Resource-specific scopes use the format:
action:resource - Examples:
read:events,write:data,admin:settings - Defined by each OAuth resource/app independently
- Validated against the resource’s
scopesconfiguration
Scope Best Practices
Request minimal scopes
Request minimal scopes
Only request scopes your app actually needs. Users are more likely to authorize apps that request fewer permissions.
Handle missing scopes gracefully
Handle missing scopes gracefully
Users may deny certain scopes. Your app should work with reduced functionality:
Document required scopes
Document required scopes
Clearly document which scopes your app requires for different features:
Always include 'openid'
Always include 'openid'
For OIDC compliance and ID token issuance, always include the
openid scope:Scope Reference Table
| Scope | Type | Description | Grants |
|---|---|---|---|
openid | Standard | OIDC authentication | ID token, identity ID |
profile | Standard | User profile | Display name, handle, avatar |
email | Standard | Email address | User’s email |
offline_access | Standard | Refresh token | Long-lived access |
user_id | Extended | Permanent user ID | User UUID across identities |
Discovery
Query supported scopes via the OIDC discovery endpoint:Next Steps
Authorization Flow
Learn how to request scopes in the authorization flow
Token Exchange
Understand scope validation in token operations