# Account Linking with Auth0-spa-js

**URL:** <https://community.auth0.com/t/account-linking-with-auth0-spa-js/67042>\
**Category:** Get Help\
**Tags:** auth0-spa-js, spa, account-linking\
**Created:** [July 29, 2021, 3:11pm UTC](https://community.auth0.com/t/account-linking-with-auth0-spa-js/67042 "2021-07-29T15:11:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick.weinandt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nick.weinandt/32/13374_2.png) [@nick.weinandt](https://community.auth0.com/u/nick.weinandt)\
**Post date:** [July 29, 2021, 3:11pm UTC](https://community.auth0.com/t/account-linking-with-auth0-spa-js/67042/1 "2021-07-29T15:11:16Z")

</div>

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](https://github.com/auth0-samples/auth0-link-accounts-sample/tree/master/SPA)

but according to this page: [Migrate from Auth0.js to the Auth0 Single Page App SDK](https://auth0.com/docs/libraries/auth0-single-page-app-sdk/migrate-from-auth0-js-to-the-auth0-single-page-app-sdk)

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

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [July 30, 2021, 3:36pm UTC](https://community.auth0.com/t/account-linking-with-auth0-spa-js/67042/3 "2021-07-30T15:36:40Z")

</div>

Hi @nick.weinandt,

Welcome to the Auth0 Community!

> [@nick.weinandt](#):
>
> Account linking is not supported for the spa sdk. Which one is true?

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](https://auth0.com/docs/users/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.

> <https://github.com/auth0-samples/auth0-link-accounts-sample/blob/f13f33940628c9538f37c624ec6a7ccd1370fb2f/SPA/public/js/app.js#L63-L88>

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 23, 2021, 4:34pm UTC](https://community.auth0.com/t/account-linking-with-auth0-spa-js/67042/4 "2021-08-23T16:34:45Z")

</div>

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