Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

Prompt and account selection

An authentication request can tell the provider how much to show the person: nothing at all, a fresh sign-in, a consent screen again, or a choice between accounts. The prompt parameter carries that wish, and each value has its own answers for the application to handle. All domains, identifiers and tokens in these examples are fictional.

Asking without interrupting

Offline access and refresh behavior ended with a limit. A refreshed ID token still carries the time of the original sign-in, and a successful refresh says nothing about whether anyone is at a browser. When an application needs to learn something about the person now, it has to send the browser back to the provider's authorization endpoint. That raises a question the application hasn't had to answer before: how much should the provider show the person while they are there?

The prompt parameter is how the application answers. It appeared as prompt=consent, which made the provider ask again before granting offline access. It has other values, and each tells the provider something different about the interaction the application wants.

Ava Archer signed in to the collage app with her photo account at 09:00 UTC on 1 October. By the next morning her collage session has expired, and she opens collage.example again. The collage app no longer knows who she is. It could show its sign-in page and wait for her to choose Continue with your photo account, but she probably still has a session at the photo service in this browser. If she does, a click that sends her there and straight back is wasted effort.

With prompt=none, the collage app can find out without showing her anything. It sends its usual authentication request with one extra parameter:

https://auth.photos.example/authorize
  ?response_type=code
  &client_id=photo-collage
  &redirect_uri=https%3A%2F%2Fcollage.example%2Fsignin%2Fcallback
  &scope=openid%20profile%20email
  &state=demo-signin-4
  &nonce=demo-nonce-4
  &code_challenge=gwVlmAVBIZ7cJBaJAwIkTniP3Mp-iIrrGgr3DOJZNnk
  &code_challenge_method=S256
  &prompt=none

Apart from the last line, this is the request the collage app always sends, with a new state, nonce and PKCE pair for this attempt. prompt=none tells the photo service that it must not display any sign-in or consent page. It either answers from what it already knows or returns an error.

This morning the photo service still has Ava's session, and she approved the collage app's request when she first signed in. It returns a code without showing a page, and her browser is back at the collage app almost before the address bar changes. The collage app exchanges the code and validates the ID token as it would after any sign-in, including the nonce demo-nonce-4. One claim deserves a closer look:

{
  "iss": "https://auth.photos.example",
  "sub": "user-2048",
  "aud": "photo-collage",
  "iat": 1790928000,
  "exp": 1790928300,
  "auth_time": 1790845185,
  "nonce": "demo-nonce-4"
}

The token was issued at 08:00 on 2 October, but auth_time is still 08:59:45 on 1 October, the last time Ava actually used a credential at the photo service. Nothing new was authenticated this morning. The photo service only confirmed that this browser still holds her session, and like a refresh, that doesn't show she is the one using it. The collage app creates a new session of its own and records the older auth_time, not the time of the silent check, because Session age and reauthentication depends on the true value.

On a morning when Ava had signed out of the photo service, the same request would come back with an error instead:

https://collage.example/signin/callback
  ?error=login_required
  &state=demo-signin-4
  &iss=https%3A%2F%2Fauth.photos.example

The collage app checks the state and issuer just as it would for a success, then shows its sign-in page as if it had never asked. For a silent check, an error is an ordinary answer, not a failure to investigate. Each error names the page the photo service would have needed to show:

Errors a silent check can return
ErrorWhat the photo service would have needed to show
login_requiredA sign-in page, because it has no session it can use for this request.
consent_requiredA consent screen, because Ava hasn't approved what the collage app is asking for.
account_selection_requiredAn account chooser, because several of her accounts are signed in and it can't pick one.
interaction_requiredSome other page, such as updated terms to accept or a step its own policy requires.

Answered from what it knows

Provider session
Ava
Earlier approval
Yes
Page it would need
None
Answer
A code

Signed in with the earlier auth_time

No session to use

Provider session
None
Earlier approval
Yes
Page it would need
A sign-in page
Answer
login_required

Show its own sign-in page

Session without consent

Provider session
Ava
Earlier approval
No
Page it would need
A consent screen
Answer
consent_required

Show its own sign-in page

Ava and her club account

Provider session
Two accounts
Earlier approval
Yes
Page it would need
An account chooser
Answer
account_selection_required

Show its own sign-in page

One silent check when a visit starts is enough. Answering an error with another prompt=none request can bounce the browser back and forth without end.

Four mornings, one silent request: only a session with an earlier approval returns a code, and every other answer sends Ava to the collage app's own sign-in page.

What the collage app must not do is try again on its own. An app that answers login_required with another prompt=none request, or that runs a silent check on every page load, can bounce the browser back and forth without end. One silent check when a visit starts is enough. After that, the next request to the photo service should be an interactive one that Ava started by choosing to sign in.

Applications that run in the browser once made these checks in a hidden frame, loading the authorization request in an invisible iframe so the page never navigated away. That pattern no longer works reliably. Inside a frame on collage.example, the photo service is a third party, and browsers increasingly withhold third-party cookies, as What browsers add described: some block them or keep a separate cookie jar for each site by default, and the others let people turn them off. When the photo service can't see its own session cookie, it answers login_required even though Ava is signed in. The check works as a top-level redirect like the one above, where the photo service's cookies are first-party.

Asking again

Sometimes the collage app wants the opposite: an interaction the photo service would otherwise skip.

prompt=login asks the photo service to authenticate Ava again even though she has a session. If it can't, it returns an error, typically login_required. The collage app would use it when it needs evidence that the person at the keyboard can still sign in as Ava, not only that this browser holds her session. Session age and reauthentication follows that case, and shows why the collage app then checks auth_time itself instead of trusting that its request was honored.

prompt=consent asks the photo service to show its consent screen even if Ava has approved this request before. If it can't obtain consent, it returns consent_required. Offline access is the case the specification names: a request for offline_access carries prompt=consent because an earlier approval isn't always enough for access that continues while Ava is away. An application might also use it when it wants her to look again at what she is sharing. The consent screen still belongs to the photo service. The collage app can ask for it to appear, but it can't change what it says.

The parameter takes a space-separated list, so prompt=login consent asks for a fresh sign-in and a consent screen. The exception is none, which must stand alone. A request with prompt=none login asks for no pages and a sign-in page at once, and the photo service returns an error instead of guessing which the collage app meant.

Choosing an account

Ava also keeps a second photo account, which she uses for a neighborhood photography club. Some providers let a person stay signed in to several accounts in the same browser and switch between them. When the collage app sends an ordinary request, such a provider picks one, often the one used last. If that happens to be the club account, the collage app receives a perfectly valid sign-in for an account Ava didn't mean to use, and it may create a new, empty collage account to go with it.

The collage app's sign-in page can offer a way out, a link labeled Use a different photo account, which sends prompt=select_account. The photo service then shows its account chooser, even if it could have picked an account itself. If it can't get a choice from Ava, it returns account_selection_required, the same error a silent check receives when the photo service would have needed to ask.

The chooser is the photo service's page, not the collage app's. The collage app never learns which other accounts Ava has. It receives only the sign-in for the one she picked, validated and looked up by its issuer and subject like any other.

One more value comes from a separate, newer specification, Initiating User Registration via OpenID Connect. prompt=create, sent on its own, asks the provider to open its account creation page instead of its sign-in page, so a collage customer without a photo account can go straight to signing up. What happens on that page is the provider's decision, and someone who already has an account may simply sign in with it, so the collage app can't assume an account was created. It handles the response like any other sign-in. A provider that supports the value lists create in the prompt_values_supported field of its discovery document, and the collage app offers its sign-up link only then, because a provider that doesn't recognize a prompt value may reject the request or quietly ignore the value.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

The collage app runs its prompt=none check in a hidden frame. In some browsers it always receives login_required, even when Ava is signed in to the photo service. Why? 1 of 3

Choose one answer.

A silent check comes back with error=login_required and the expected state. What should the collage app do next? 2 of 3

Choose one answer.

A prompt=none check returns a code, and the validated ID token has an iat of 08:00 today and an auth_time of 08:59:45 yesterday. What should the collage app record for its new session? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity