Auth0 Home Blog Docs

Account Linking Client Side with Angular 2+


#1

Hi ,

Does anyone have any guidance or examples of user initiated account linking using angular 2+. i am following the documentation https://auth0.com/docs/link-accounts/user-initiated-linking

For Step 1 Initial Login - I am using the universal login which works ok

For Step 2 - User initiates account linking - I ahve tried using the lock but get an error when lock.show() saying ERROR TypeError: e.count is not a function

I am new to Angular and was really looking for sample code / approach.

any help much appreciated.


#2

:wave: @jamesmagin the message seems to indicate that you may be attempting to call a value from a function, but the value is not actually a function. Could you please share the code that is giving you this error?


#3

Hi Kim, tahnks for your rsponse.

I have since managed to move this forward by calling the universal login for a specific connection when performing the user initiated account linking (Step2 in the documentation). This now seems to work fine although I am struggling to make the final step 3 i.e. Call the API to link accounts

I get teh following error {“statusCode”:400,“error”:“Bad Request”,“message”:“Bad HTTP authentication header format”,“errorCode”:“Bearer”}

I have also added the scope update:current_user_identities to my unversal login call. Attached is more info on the API call

Again any help much appreciated.
James