Solved

How to force an alias between two user IDs?

  • 26 August 2021
  • 1 reply
  • 40 views

Badge

 

I’m looking at this chart, but why is there no option to forced an alias create in the Non-Anonymous App User ID. We’re migrating all our user IDs to a new system (new login, new backend), so we will have to force a restore purchase for all of them for them otherwise their subscription isn’t recognized. 

 

The problem is we have a few thousand stripe users, so a restore purchase doesn’t work for them. This will create a support nightmare for us when suddenly thousands of users can’t access their subscription. Why can’t I force create an alias for them to their new user IDs? 

 

Also - under what scenario does the user go from Non-Anonymous to Anonymous without calling logOut() ? Because in our upgrade flow: old app version passed userID to the SDK on int, in new version of app, we will still pass that old userID and then call logIn() once they have signed up with new backend.

 

Can I still manually call the `createAlias` method even though it is deprecated? 

icon

Best answer by ryan 27 August 2021, 19:38

View original

1 reply

Userlevel 4
Badge +8

Hey @Zachary Shakked!

 

There is a REST API for this you can call with a secret key from your server, or you can manually call the `createAlias` method from the SDK. The SDK method is fine to use but will be deprecating it in favor of the server-side REST API.

Sounds like you may be able to run some server-script for this migration?

 

Also - under what scenario does the user go from Non-Anonymous to Anonymous without calling logOut() ?

This should only happen on logOut(), or if the customer uninstalls and re-installs the app.

 

Because in our upgrade flow: old app version passed userID to the SDK on int, in new version of app, we will still pass that old userID and then call logIn() once they have signed up with new backend.

If you can alias these identities on your new backend that could be the cleanest, I’ll shoot you over some more details.

Reply