Skip to content
Customer IdentityMarkdown

The consent page

Users see what an app asks for and allow or deny it, the realm remembers their answer, and they can take it back at any time.

AvailableAPIRFC 6749, OpenID Connect Core 1.0

When an app asks for access to a user’s account, the realm shows the user a consent page: which app, what it asks for, and which account they’re signed in as. The user allows or denies it. The realm remembers the answer, so they aren’t asked again for the same thing, and the user can see every app they allowed and take any of them back.

Consent matters most for your customers, who decide for themselves which apps may use their account. For your own first-party apps, you can let trusted apps skip the page.

  • Privilege: none for the page itself, which every realm shows. Changing the realm’s consent settings, an app’s name or the page’s wording needs RealmOwner in the realm.
  • Where: the API.
  • An app registered in the realm, with the name customers should see in clientName.

The consent page is in the user’s own language, and shows:

  • the app, by its clientName, or its client ID when it has no name;
  • each scope it asks for, by its label;
  • the authorization details it asks for, each shown whole (see Rich authorization requests);
  • the APIs the tokens will be for;
  • who is signed in, so the user knows which account they’re allowing.

Allow sends the user back to the app with a code; Deny sends them back with access_denied.

During a browser sign-in (Authorization code with PKCE), once the user is signed in, the realm decides whether it must ask. If it must, it sends the browser to the consent page with a one-time consent challenge. The answer goes back with the challenge. If the app sent prompt=none and the user would have to be asked, no page is shown, and the app is told consent_required.

SituationAsked?
The app asks for the first timeYes
The app asks again, for no more than beforeNo, while the realm remembers consent
The app asks for more than beforeYes
The app asks for offline_access, access while the user is awayAlways
The app sends prompt=consentAlways
The app asks for authorization_detailsAlways: only scopes are remembered
A public app whose return address another program on the device could claimAlways
A trusted app, where both the realm and the app allow skippingNo

Users see every app they allowed on their Authorized Apps page in the dashboard, or through the API, and remove any of them. Removing an app ends its tokens for that user at once, and the next time it asks, the user is asked again. See Authorized apps.

Consent works with no set-up: every realm remembers what users allowed, and asks every app. To change that, as a realm administrator with your session in $CVYUH_SESSION (see Call the API), change the realm’s oauth2Settings:

Terminal window
curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2Settings \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
-H "Content-Type: application/json" \
-d '{ "consentChallengeLifetimeSecs": 900 }'

A scope with no label is shown by its name, which means little to a customer. Give each of your scopes a label, per language, in the oauth2 part of the realm’s message bundle. Here read:orders in English and French:

Terminal window
curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/i18nBundle/i18nBundle \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
-H "Content-Type: application/json" \
-d '{ "bundles": {
"oauth2": {
"en": { "scope.read:orders": "See your orders" },
"fr": { "scope.read:orders": "Voir vos commandes" }
}
} }'

A customer whose browser asks for French, signing in to Example App with scope=openid read:orders, then reads:

Autoriser l'accès
Example App demande l'accès à votre compte.
• Vous connecter
• Voir vos commandes
Connecté en tant que Maya Chen
[Autoriser] [Refuser]

In English the same page reads “Example App is asking to access your account”, with “Sign you in” and “See your orders”.

The page’s own lines (its title, the prompt, the buttons and “Signed in as”) are messages too, under consent.title, consent.prompt, consent.allow, consent.deny and consent.signed.in.as, and change the same way.

WhereSettingWhat it does
oauth2SettingsrememberConsent (on)Remember what users allowed
oauth2SettingsconsentSkipAllowed (off)Let trusted apps skip the page
oauth2SettingsconsentChallengeLifetimeSecs (600)How long the user has to sign in and answer
oauth2ClientconsentImplied (off)This app skips the page, where the realm allows it
oauth2ClientclientNameThe name the page shows for the app
i18nBundlebundles.oauth2.<language>The labels for scopes (scope.<name>) and authorization-details types (authorizationDetails.<type>)
What happenedWhat the user seesWhat to do
The challenge ran out of time”This request can no longer be answered. Return to the application and try again.”They start again from the app. Raise consentChallengeLifetimeSecs if customers often take longer
The page was answered already, or opened in another browser or sessionThe same messageThey start again from the app
The user chose DenyYour app’s return address, with error=access_deniedShow a page in your app that says what the app can’t do without it
The app sent prompt=none and consent was neededYour app’s return address, with error=consent_requiredSend the user again without prompt=none
LimitDefaultRange
Time to sign in and answer (consentChallengeLifetimeSecs)600 seconds60 to 3600 seconds
Answers per challengeOne
Languages includedEnglish, French, GermanAdd any language through the message bundle
Remembered consentOne record per user and appWidened as the app asks for more
SymptomCauseFix
The page shows the app’s client IDThe client has no clientNameSet clientName on the app
The page shows a scope’s raw nameThe scope has no label in the user’s languageAdd scope.<name> for that language
A trusted app still shows the pageOne of consentSkipAllowed, consentImplied is off, the app is public with a loopback or custom-scheme return address, or the request carries offline_access, prompt=consent or authorization_detailsSee Show or skip the consent page
Customers are asked at every sign-inrememberConsent is off, or the app asks for offline_accessTurn rememberConsent on; offline_access is always asked

An Allow writes or widens the user’s oauth2Consent record, and the token that follows is a TOKEN_ISSUED record on their audit trail. A user taking an app back is an APP_TAKEN_BACK record. Changes to oauth2Settings, a client or the message bundle are in Change history.

  • Only the user who is signing in can answer, from the same session.
  • A challenge is answered once.
  • The time covers signing in as well as answering.
  • Labels are your own text. A scope’s label is the message scope.<name>, and an authorization-details type’s is authorizationDetails.<type>, set per language as for Pages in the user’s language. English, French and German are included, with labels for openid and offline_access.
  • Page text has no links. The wording you set is shown as text. A link to your terms or privacy policy can’t be placed on the page; show them in your app before it sends the customer to sign in.