Pick the fix
A user signs in with Google. How should your database identify them?
Hint 1 of 1
Which claim never changes for that user?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A By the issuer and the sub claim from the verified ID token
Correct. Stable and unique per provider.
The OpenID Connect spec guarantees that issuer plus sub is unique and never reassigned for a user. Email can change or be reused, so it's profile data, not a key.
Why not the others?
- B By email address. Emails change and may be unverified.
- C By the access token. Tokens expire and rotate.
- D By display name. Neither unique nor stable.