Skip to content

Customize OIDC Scope

Usage scenarios

Customize the user information returned by the ID Token by customizing the Scope and the Claims in it.

OIDC Scope Function Configuration

After creating a self-built application, you can find the "OIDC" function area under the "Protocol Configuration" function area and find the "OIDC Scope Configuration".

Untitled

Claim Configuration

Default Claim

Claim NameMapped GenAuth User Fields
subuserId
namename
addressaddress
usernameusername
emailemail
email_verifiedemailVerified
phone_numberphone
phone_number_verifiedphoneVerified
birthdatebirthdate
family_namefamilyName
gendergender
given_namegivenName
localelocale
middle_namemiddleName
namename
nicknamenickname
picturepicture
preferred_usernamepreferredUsername
profileprofile
updated_atupdatedAt
websitewebsite
zoneinfozoneinfo
external_idexternalId
userpool_iduserpoolId
formattedformatted
street_addressstreetAddress
postal_codepostalCode
countrycountry

Custom Claim

If the above default Claim still does not meet the user fields you expect to be returned, you can create a custom Claim and customize which GenAuth user field (basic field or extended field) your Claim maps to.

Step 1: Click "Add a Mapping"

Untitled

Step 2: Edit the name of your custom Claim

Untitled

Step 3: Configure the GenAuth user field mapped by the custom Claim

Untitled

Scope Configuration

Default Scope

Scope nameContained claimsDescription
offline_access/If this parameter exists, the token interface will return the refresh_token field
openidsubUsed to store user ID
usernameusernameUser name
addressaddressUser address
emailemail, email_verifiedUser email and verification status
phonephone_number, phone_number_verifiedUser phone number and verification status
profilebirthday, family_name, gender, given_name, locale, middle_name, name, nickname, picture, preferred_username, profile, updated_at, website, zoneinfoUser details
rolesrolesUser role list corresponding to role information
external_idexternalIdUser ID in the original system
extended_fieldsextended_fieldsUser's extended field information, the content is an object, the key is the extended field name, the value is the extended field value

Custom Scope

If the default scope above still does not meet the user fields you expect to be returned, you can create a custom scope and customize which claims will be included in your scope.

Step 1: Click "New Custom Scope"

Untitled

Step 2: Modify the name of your custom scope

Untitled

Step 3: Configure the claims included in the custom scope

Untitled

Use custom scope & claim

  • Use the hosted login page: GenAuth will return all preset scopes and your custom scope by default.
  • Use SDK to call directly: You can freely choose to call all the scopes you have configured and the claims they contain.

Agent infrastructure for identity, memory, and web action.