Beta

Create a tenant

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

Adding social sign-in

A row of provider buttons on a sign-in page gives people familiar ways in, and each button is another entrance to the same accounts. The relying party sets rules for every entrance: who it may let in for the first time, how far it relies on the provider's sign-in, and what happens when the provider changes or goes away.

Another entrance to the same application

All domains, identifiers and tokens in these examples are fictional.

On 29 September, the day after Ava linked her photo account, she goes back to the collage app to order prints of a new collage. Her mail account is open in another tab, and the collage app's sign-in page now has two buttons under the password form: Continue with your photo account, and Continue with your mail account. She chooses the mail button for the first time.

A row of buttons like that is usually called social sign-in, because the accounts behind them are ones people already use every day: a mailbox, a social network, a photo library. Supporting several providers registered a relying party at a second provider and gave it a configuration entry of its own, and Linking accounts showed how a second way in is attached to an account safely. What is left once those mechanics work is the rules the collage app sets for each button, and what happens to the people behind a button when its provider changes or goes away.

The word "social" describes what the person sees, not a lighter kind of sign-in. Behind the mail button is the same exchange the photo button uses, checked entirely against the mail service's entry: its issuer, its key set, the client ID it issued to the collage app, and a nonce, state and PKCE verifier from Ava's own attempt. Nothing is skipped because the provider is a familiar consumer service. Decoded, the ID token from her sign-in looks like this:

{
  "iss": "https://accounts.mail.example",
  "sub": "a94f1c07e2",
  "aud": "c2d7a915-4e8b-4f03-a6d2-7b19e5f80c4d",
  "iat": 1790710200,
  "exp": 1790710500,
  "auth_time": 1790710181,
  "nonce": "demo-nonce-21",
  "name": "Ava Archer",
  "email": "[email protected]",
  "email_verified": true
}

The token was issued at 19:30:00 UTC and expires five minutes later. Once it validates, the collage app holds a verified pair, https://accounts.mail.example and a94f1c07e2, and looks it up in its sign-in identities table. There is no row. This mail account has never opened a collage app account, and what happens next is no longer a question about tokens.

What the new button really changes is the number of ways into collage app accounts. Account 8812 already opens with Ava's password and with user-2048 at the photo service. A third entrance is convenient. It is also one more place where someone could try to get into an account that isn't theirs, and one more outside service the collage app depends on. Each entrance therefore gets its own answers to three questions: who it may let in for the first time, how much the app relies on what happened at the provider, and what the people who use it will do if it disappears.

Rules for each entrance

Those answers live in the provider's configuration entry, beside its issuer and client ID, and they can differ from one button to the next:

Illustrative per-provider rules on the collage app's two buttons
RulePhoto buttonMail button
A first sign-in from an unknown subjectMay create an account, or connect an existing oneMay only connect an existing account
Addresses allowed on new accountsAny address the provider verifiedNone, while it creates no accounts
The provider's two-step sign-in counts as the app's ownNoNo
Shown on the sign-in pageYesYes

The first row is the account policy. Creating an account is a legitimate choice, but it creates a collage app customer, not a copy of the mail account. The new account gets the app's default customer settings and inherits nothing from the mail service, whatever that account is allowed to do there. Connecting only is the cautious start for a new button: the people who use it already have collage app accounts, and nobody can arrive through it without one. Some relying parties go further and allow new accounts only for addresses in particular domains, which suits a button meant for one organization's staff and means little for a public mail service.

The third row is about authentication strength. The collage app asks for a second step before anyone changes a delivery address. An ID token can carry an amr claim, a list of the authentication methods the provider used, such as a password and a one-time code. If the mail service reports there that its own sign-in used two factors, the collage app could skip its own second step, but only if it trusts the mail service's second factor as much as its own and has agreed what the claim means, the question Authentication context and methods takes up. For a consumer mail service the app leaves this off, and a mail sign-in still meets the app's own second step when it matters.

The subject is also specific to this entry. The mail service issues pairwise subjects, so a94f1c07e2 identifies Ava only to the collage app's website registration. If the app later replaces that registration, or adds a phone app under a different one, the mail service may send a different subject for the same person, as Public and pairwise subject identifiers explained. A registration change at a provider is an account change in disguise, and the app plans it as one.

New account or an existing account

The collage app has started the mail button on connecting only, while it tries the button with customers who already have accounts. So Ava lands on a page that says this mail account isn't connected to a collage app account yet, with a single choice: sign in to her collage app account to connect it.

The page doesn't open account 8812. The token reports [email protected], which is the address on account 8812, and the mail service operates that mailbox, but neither fact connects the two accounts, for the reasons Linking accounts gave. Ava signs in to account 8812 with her password and confirms, and the app writes the link exactly as that lesson described, with a single-use confirmation and a notice to the address it confirmed itself. Her account now has three entrances:

Account 8812
  Password:  set
  Sign-in identities
    https://auth.photos.example     user-2048    linked 2026-09-28 18:12 UTC
    https://accounts.mail.example   a94f1c07e2   linked 2026-09-29 19:31 UTC

Once the trial goes well, the collage app lets the mail button create accounts too. The change affects only first sign-ins. Ava's row is untouched, and her next mail sign-in opens account 8812 as before. A newcomer whose mail subject has no row is now offered a new collage app account, or a sign-in to connect an existing one. If that newcomer's verified address happens to match an existing account, the app still doesn't open it. It offers the same choice as to anyone else, and the existing account opens only after its own sign-in.

Because a policy change alters who can get in, the app treats it like any other security setting: an administrator makes it, the change is recorded with who made it and when, and the next first sign-in follows the new rule. Nothing about the policy travels in a token, so nothing a provider sends can change it.

Connects only

Who arrives
Ava's new mail subject
Address matches 8812
Yes
The app shows
A connect page
Account 8812 opens
After her password

Linked after her own sign-in

Creates accounts

Who arrives
A newcomer
Address matches 8812
Yes
The app shows
New account or connect
Account 8812 opens
After its own sign-in

A new customer, default settings

Provider unreachable

Who arrives
Any customer
Address matches 8812
Never checked
The app shows
Sign in another way
Account 8812 opens
With her password

Mail-only accounts are locked out

Nothing about the policy travels in a token, so nothing a provider sends can change it.

The same mail button under each policy and during an outage. A matching address never opens account 8812, and only an account with no other entrance is stranded when the provider goes away.

Plan for provider changes

One evening the mail service stops answering. A customer who chooses the mail button gets no response from accounts.mail.example, and the collage app shows a plain message: mail sign-in is unavailable right now, sign in another way. What it must not do is lower the bar while the evidence is missing. It doesn't open the account whose address matches, accept a profile it can't validate, or skip the nonce check until the provider recovers. Ava signs in with her password and finishes her order.

Later, the collage app's team decides to switch the mail button off for a while. Once the entry is disabled, a fresh mail sign-in is refused at the app before any redirect, with the same kind of message. The rows in the sign-in identities table stay where they are. Disabling an entrance is a change to the app's configuration, and switching it back on restores every existing link without anyone linking again.

Whether a disabled button locks anyone out depends on what else their account has. Ava's has a password and the photo sign-in, so nothing changes for her. A customer who registered through the mail button after it began creating accounts, and never set a password, has no way in. Before retiring a provider for good, the app finds the accounts whose only entrance is that provider and asks those customers to add a password or another provider while they can still sign in. For anyone it misses, recovery goes through the address the app confirmed itself, not through the provider that has gone.

Providers change in quieter ways too. A new signing key is routine, because the app reads the mail service's keys from its discovery document. A new issuer is not. If the mail service ever moved to a different issuer identifier, every sign-in would arrive as an unknown pair, and the app would need a planned move of each row from the old issuer to the new one, agreed with the provider, rather than matching people up by email. The same is true when a pairwise subject changes because the app's registration changed.

Removing a single link stays a sensitive change, as Linking accounts described: the app asks for fresh proof and refuses to remove the last way in. It is also separate from the app's relationship with the mail service. Deleting Ava's row tells the mail service nothing. If the app also asks the mail service to revoke what it granted the app, and that call times out, the app treats the outcome as unknown and checks again, instead of telling Ava the connection is gone.

Before the button went live, and again before each policy change, the collage app's team tried cases like these:

Illustrative cases for the mail button and the outcome each should produce
CaseExpected outcome
A returning customer with a linked rowThe linked collage app account opens, under either policy
A new subject while the button connects onlyA connect page, and no account opens until an existing account's own sign-in
A new subject once the button creates accountsA new collage app account with default settings, or a connect page if the person chooses it
A new subject whose verified address matches an accountThe same choices as any new subject, never the matching account
The provider disabled or unreachableA clear refusal, and the other entrances still work
An account whose only entrance is the mail buttonFound and contacted before the button is retired

Check your understanding

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

The collage app plans to retire its mail button next month. Which accounts need attention before the button goes? 1 of 3

Choose one answer.

One evening the mail service stops answering, and customers who choose the mail button get no response. What should the collage app do for them? 2 of 3

Choose one answer.

The mail service's ID token lists two factors in amr. The collage app has never assessed the mail service's second factor. Before Ava changes a delivery address, what should the app do? 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