I have two tenants A and B. In both tenants I have installed the Auth0 Account Link Extension.
My scenario is:
- Sign user to my app using a Database Connection with an email address/password.
- Logout.
- Sign up/login to my app in with a social login provider (in this case Google) with the same email address as in (1)
- The Account Linking extension detects that I’ve previously signed up with the email address and asks if I want to link them.
- I click “Continue”.
- On one tenant it succeeds, on another it errors out.
I’ve checked that in both tenants
- The version of the Account Link Extension is the same at version 2.6
- The extension Rule code is the same, and both tenants only have 1 Rule currently, being from the Account Link extension.
- The client/application created by the extension installation has the same configuration, especially scopes.
- The properties of the extension are the same (title, logo, etc)
However in tenant A using the extension works, but in tenant B it fails.
Looking at the WebTask logs I saw for tenant B
10:05:37 AM:
[ACCOUNT_LINK]: Entered Account Link Rule
10:05:37 AM:
[ACCOUNT_LINK]: API call failed: {
statusCode: 400,
error: 'Bad Request',
message: 'Main identity and the new one are the same.',
errorCode: 'operation_not_supported'
}
10:05:37 AM:
[ACCOUNT_LINK]: [object Object] Error: [object Object]
at Request.handleResponse [as _callback] (/data/io/node12/13070d62-c31b-432b-9507-9bdb3326f76e/webtask.js:276:18)
-
This
[object Object]
is really not helpful at understanding the error. Searching the forums I’ve seen other devs who are using social login/account linking getting this. When the user is redirected to my application, I don’t get get much in the logs
?error=access_denied&error_description=[object Object]&state=abc123
. So I think there’s a bug here that could be fixed to aid in error reporting -
I have no idea why it is working in one tenant but not the other. I’m using the
a0deploy
tool to keep my tenants in sync and diffing my codebase I can’t see something obvious that I’ve stuffed up.