Claim stability and privacy
Claims describe a person as they are now, and most of them can change or even pass to someone else. This lesson sorts the claims that can change from the pair that cannot, reads what email_verified really promises, and shows how an application collects, refreshes, and protects as little as it needs.
What can change
Imagine that, a few years from now, Ava moves to a different mail provider. She changes the address on her photo account and closes her old mail account. The mail service holds [email protected] for a while and then, under its own policy, lets someone else register it. The new owner creates a photo account with that address and verifies it. The photo service now reports "email": "[email protected]" and "email_verified": true for a different account, and its new owner signs in to the collage app with that photo account. All domains, identifiers, and values in these examples are fictional.
A collage app that found accounts by email address would open Ava's for them, with her order history, her saved collages, and the delivery addresses she entered. Every value it received was true. The address really is verified, and it really does belong to the person signing in. It just no longer belongs to Ava.
The new owner signs in
- [email protected]
- email_verified
- true
- Account key
Would open Ava's for them
The new owner signs in
- [email protected]
- email_verified
- true
- Account key
- iss and sub
They are a new customer
Every value it received was true. It just no longer belongs to Ava.
Almost everything about a person can change, and the claims that describe them change with it:
| Claim | How it changes |
|---|---|
name, given_name, family_name | People change names when they marry, divorce, transition, or simply prefer another form. Two different people can share a name. |
email | People change it, and an address someone gives up can be reassigned to someone else. The specification explicitly allows a provider to report the same address for different people at different times. |
phone_number | Numbers move between carriers and people, and a number someone gives up can be issued to someone new. |
preferred_username | It can be changed at any time, and someone else can choose a name another person has given up. It was never guaranteed to be unique. |
sub, with iss | Never reassigned to another person within the issuer. A pairwise value changes only if the relying party's sector does. |
OpenID ConnectAn identity layer on top of OAuth 2.0 that lets an application sign people in with an account at another service. It adds the ID token, standard claims, and discovery to the OAuth exchange. draws the conclusion itself. The issuerThe party that creates and signs a token, assertion, or certificate, named in a token's iss claim. A recipient must check that the issuer is exactly the one it expected and trusts. and subject, taken together, are the only claims a relying partyAn application that accepts and relies on a sign-in from another service, the name used in OpenID Connect and for passkeys. SAML calls the same role a service provider. can rely on as a stable, unique identifier for a person. Claims such as email, phone_number, preferred_username, and name must not be used as unique identifiers, whether they arrive in the ID tokenIn OpenID Connect, a signed JWT from the provider, addressed to one client, saying which account authenticated, when, and in answer to which request. It reports a sign-in and is not used to call APIs. or from UserInfoAn OpenID Provider endpoint that returns claims about the signed-in person to a client presenting an access token. Its sub must match the ID token's before the client uses anything it returns..
So the collage app keeps two kinds of information apart. The pair of https://auth.photos.example and user-2048 is the key to Ava's account. Her name, picture, and email address are copies: useful for greeting her, showing beside her collages, and sending receipts, and expected to change. When the new owner of [email protected] signs in, their issuer and subject match no collage account, so they are a new customer, whatever their email address says. Trust across systems showed that matching on email alone can hand an account to the wrong person. Reassignment shows it can happen even when every value is honest.
What email_verified means
It is easy to read email_verified as "this is definitely their address". The specification says something narrower. When the value is true, the provider took affirmative steps to ensure that the person controlled the address at the time it carried out the verification. How it verified, and when, are left to the provider and to whatever agreements it operates under.
That leaves the collage app three questions to judge. The first is when. The photo service may have sent Ava a confirmation link the day she created her account, years ago. The claim does not say, and control of an address can lapse in the meantime. The second is how. One provider confirms an address with a link sent to that inbox. Another accepts addresses from a company directory. A mail provider can report its own addresses as verified because it operates those mailboxes, though, as the mail service showed, it can also reassign them. The third is who. true from a provider the collage app has never assessed is only as good as that provider's process, which is why Trust across systems said a service needs to understand how its identity partners verify account information.
The collage app treats only the JSONA text format for structured information, written as named values inside curly braces. APIs, tokens, and discovery documents all use it. value true as verified. false, a missing claim, and any other value all mean that, as far as the collage app knows, the address is not verified.
Then the collage app uses the claim in proportion to what is at stake, as it did with every claim in Standard and custom claims. A verified address is good enough to receive receipts. On its own, it is not good enough to connect a sign-in to an existing collage account with the same address, because that hands the account to whoever controls the address now, and after a reassignment that is somebody else. Linking accounts covers how a relying party makes that connection safely. phone_number_verified works in the same way for phone numbers.
Collecting less
Every claim the collage app stores is something it has to protect, keep accurate, and eventually delete, and something that can identify the person to anyone who sees it. As Public and pairwise subject identifiers showed, it can also link a person across services. The claim that is never requested causes none of those problems.
So the collage app starts from what each feature needs. Greetings need a given name, saved collages look friendlier with a picture, and receipts need an email address. Where a provider supports the claims parameter, the collage app asks for given_name, picture, email, and email_verified, and leaves the rest of profile alone. It does not ask for the address claim at sign-in just because it ships parcels. It asks for a delivery address at checkout, when Ava is deciding where this particular printed collage should go, which may not be her home. Smaller requests also make shorter consent screens, and people are more willing to approve what they can read at a glance.
Then it keeps its copies current. Each sign-in brings updated_at with the other claims, and the collage app stores it with its copies. After Ava's last sign-in it holds 1788220800, 1 September 2026, the last time she changed her photo profile. If a later sign-in brings a larger value, something in her profile changed at the photo service, and the collage app refreshes its copies. If Ava has edited her display name at the collage app itself, the collage app has to decide which version wins, for example keeping her own edit unless the photo service's details changed after she made it. Between sign-ins the copies can lag behind, which is acceptable for a greeting and a picture.
It also lets go of what it no longer needs. When a feature stops using a claim, the collage app stops requesting and storing it. When Ava closes her collage account, the copies go with it.
Last, claims stay out of places they do not belong. A sign-in log records what happened: the time, the issuer and subject, the stage, the outcome, and a correlation ID. It does not need Ava's name, email address, or picture, and it never records a UserInfo response body or a tokenA piece of data issued by a trusted service that a client presents as a credential, for example to call an API or to report a sign-in. Some tokens carry readable claims; others are random strings that only the issuer can interpret.. The same goes for error reports and analytics. A support engineer can find Ava's account from the issuer and subject, and a leaked log reveals far less about her.
That leaves the collage app holding two kinds of information from each provider: the issuer and subject that identify Ava's account, and a few copies that describe her.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Reassign an email address and see why only issuer and subject identify a personMove an email address from Ava to Ben, watch an email-based lookup hand over the wrong account, and see why issuer and subject identify a person.