Hi Steph, there is no way to change IDs in RevenueCat. What this code would do is essentially log in as a new, different user, with the new ID. Access to whatever was purchased will be initially lost.
Restoring purchases could merge both users together or transfer the purchase from the original user to the new one, depending on configuration. I would discourage changing the format for existing users, maybe use subscriber attributes if you need extra information server side.
@Miguel Carranza Thanks for answering!
To clarify, if users were to get merged, would they merge under the new `appUserId`? Also what configurations are relevant for changing how accounts get merged? At the moment we’re only initializing with the following code:
await Purchases.setDebugLogsEnabled(true);
await Purchases.setup(_api, appUserId: userId);
await Purchases.collectDeviceIdentifiers();
final String? adjustId = await adjustGetAdIdIfMobileApp();
await Purchases.setAdjustID(adjustId);
Lastly, if the user’s id changes and we’re automatically checking `Purchases.getPurchaserInfo()` during app cold start to check RevenueCat’s subscription state, would RevenueCat automatically also resync with App Store/Google Play for the user’s subscription state, or does RevenueCat assume the new user has no subscription? (i.e., does the user have to explicitly trigger the Restore Purchase flow to update the new user’s state in Revenue Cat with App Store/Google Play?)
Hi Steph,
My bad, the alias (merging) mechanism is no longer an option. Merging will only happen between RevenueCat generated anonymous ids and provided app user ids, as shown in this table.
So there is no effective way to merge these customers. I was referring to the restore mechanisms configurable in the dashboard. You can either transfer the purchase to the new user (new user would “steal” the transactions) or block the restore. In any case, `getPurchaserInfo` will not do anything for the new user (it will be empty). You would have to trigger a restore.
We need the same capability as we’re changing the source of the user ID strings from Strava’s to our own identities hosted in firebase. Any chance you could have a feature request to allow people to change identifies or are we forced to figure out a solution on our own?
Is this still not possible? @Mike Wood did you ever figure out a solution?