Account Linking with Auth0-spa-js

There seems to be an example of account linking using auth0-spa.js: auth0-link-accounts-sample/SPA at master · auth0-samples/auth0-link-accounts-sample · GitHub

but according to this page: Migrate from Auth0.js to the Auth0 Single Page App SDK

Account linking is not supported for the spa sdk. Which one is true?

Hi @nick.weinandt,

Welcome to the Auth0 Community!

Both are true.

The SPA sdk does not have account linking (that is, there is no linkAccounts() method, or something of that nature), but that doesn’t mean you can’t use a User-Initiated Account Linking: Client-Side Implementation strategy in an application that uses the SPA SDK.

In the GitHub example you linked, the application is requesting an access token for the management API via the SPA SDK, then is linking the account via a POST request without involvement of the SPA SDK.

Let me know if you have any questions about it.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.