Account Linking Error through Actions Flows

Hi,

I am fairly new to the auth0 and I am trying to implement an Account Linking script through Actions Flows for my Next.js app. Overall, the script is working, however, when the account linking script is being triggered (for example user has an auth0 connection and tries to login with google) - the script works and connects accounts, but at the same time it ‘erases’ google account and user get an error callback. The server throws this error:

 error_description: 'Main identity and the new one are the same.',
  providerId: 'auth0',
  message: 'access_denied'

I assume the issue lies within the way the user info being passed, since the google account does not exist anymore, it throws error.

Next login flows are working as intended, however, the initial linking ruining whole process. Could you please help? Thanks in advance.

Hey there!

As this topic is related to Actions and Rules & Hooks are being deprecated soon in favor of Actions, I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!