Show or skip the consent page
Decide what users see when an app asks for access, name the app as they should see it, and let your own trusted apps skip the page.
APIRFC 6749, OpenID Connect Core 1.0
Before an app gets anything in a user’s name, the realm shows them a consent page: what the app asks for, with Allow and Deny. The page is on by default and needs nothing from you. This guide is for the realm administrator who wants the page to name each app well, and who wants the apps the organization owns, where asking would only get in the way, to skip it.
Before you start: you hold RealmOwner in the realm, with your session in $CVYUH_SESSION (see
Call the API), and you have the app’s client ID, here example-app.
What users see
Section titled “What users see”A page in their own language that names the app by its clientName and lists what it asks for.
- Allow sends them back to the app, signed in.
- Deny sends them back to the app, which is told
access_denied. - The page can be answered once, only by the user signing in, within ten minutes by default
(
consentChallengeLifetimeSecs). A link to it copied to another browser is refused.
Name the app
Section titled “Name the app”Set the name users should see on the app’s client. An app with no clientName is shown by its client ID.
curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Client/example-app \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \ -H "Content-Type: application/json" \ -d '{ "clientName": "Example App" }'Let a trusted app skip the page
Section titled “Let a trusted app skip the page”-
Allow skipping in the realm:
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 '{ "consentSkipAllowed": true }' -
Mark the app as one that skips:
Terminal window curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Client/example-app \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{ "consentImplied": true }'
The page is skipped only when all three hold: the realm allows it (consentSkipAllowed), the client asks for it
(consentImplied), and the app is confidential, or a public app whose return address is https. A public app
returning to a loopback port or a custom scheme is always asked, because another program on the same device could
claim that address.
Check it worked
Section titled “Check it worked”Sign in to the trusted app as a user who has never used it. The browser returns to the app with a code, and no
consent page is shown. Sign in to any other app, and the page names it by its clientName.
Undo it
Section titled “Undo it”Send { "consentImplied": false } for the app, or { "consentSkipAllowed": false } for the realm to make every app
ask again.
Related
Section titled “Related”- The consent page: when the realm asks, and every setting.
- Remember what users allowed: how often a user is asked again.
- Let users remove apps they allowed: the user’s side of consent.