Example using "Actions" to securely link accounts (that works)

We have a SPA page that uses the New Universal Login for logins/signups, we allow users to sign in either with an email/password combination or with social connections (Google, Github), and we are trying to implement the process of linking accounts at signup.

The documentation, examples and extension provided by Auth0 don’t work:

  • The Account Link Extension just doesn’t work, you get execution errors which at some point you realize is because it installs a new rule that has unsupported dependencies, and after editing the source code, it’s still broken. I don’t have time to write down all the problems, but it’s also based on a product that Auth0 is fading out: Rules, so it’s not an option to spend more time on something we’ll have to replace next year anyway.
  • The page Link User Accounts > Account linking with Actions has an example using the new - long term supported by Auth0 stuff that are Actions, but the example doesn’t work, first it doesn’t mention that you need to add the “auth0” dependency imported there in the code (OK, no big deal), but then it uses a function called getManagementApiToken which is not imported or defined anywhere, so execution errors again, and reading the code I’m pretty sure that even if I write the function myself I’ll get new errors anyway, because there are other references in the code that I’m pretty sure don’t exist, like some constants.
  • There are other examples in the documentation that are also based on Rules, which, as mentioned in the first point, is not an option due to the cost of implementing something that we’ll have to rewrite in less than a year time.
1 Like

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!

1 Like