Reference/Errors
account_does_not_match
The provider came back with a different account than the one that was linked.
What is it?
This error occurs during the OAuth flow when a signed-in user goes back to a provider that is already linked to their account, usually to grant more scopes, and the provider returns a different account than the linked one.
Linking a provider normally needs a session that signed in recently. Going back to a provider that is already linked does not, because nothing new can come of it: the flow is bound to the account that was linked when it started. A different account would be a new way into the user's account, added from a session of any age, so Entro Auth refuses it and changes nothing.
The same error is returned when the linked account was unlinked while the user was at the provider.
How to resolve
Common Causes
- The user is signed in at the provider with another account than the one they linked, and the provider picked it without asking.
- The user chose a different account in the provider's account picker.
- The account was unlinked in another tab while this flow was open.
Typical resolutions
- Ask the user to choose the account they linked. Passing a
loginHintwith the linked account's address tolinkSocialmakes most providers preselect it. - To link a second account of the same provider, have the user sign in again first, so the session
is fresh, and call
linkSocialthen.