lately I’ve been struggling with simple email account linking. I’ve tried the “Account Linking Extension”, but it turned out not to be an option for my use case, because it requires the user to manually confirm the linking though the UI.
Then I tried to use actions (specifically the “Post login” flow) and it indeed links accounts with the same email addresses, but then it returns the original user id.
- I sign in with GitHub (
- I sign out
- I sign in again in with username/password (
- Action correctly links the profile, but it returns the original username/password identity (
auth0|...). I’d expect to receive the primary user id (
To link accounts I used the
/link endpoint in the Management API v2.
Is there a way how to return the primary user id after account linking?