context.auth property:
User Info Type
Thecontext.auth object contains the following fields:
Standard Fields
userId (required)
The unique identifier for the user, extracted from the JWTsub claim. Always present and guaranteed to be unique.
email scope is granted.
name
The user’s full name or display name.username
The user’s username, if different from email.picture
URL to the user’s profile picture.Authorization Fields
roles
Array of role names assigned to the user. Used for role-based access control (RBAC).permissions
Array of specific permissions granted to the user. More granular than roles.scopes
OAuth scopes granted during authentication.Extracting Custom Claims
If you need to extract custom claims differently, use thegetUserInfo function in your OAuth configuration:
Next Steps
- OAuth Providers - Configure user claims per provider