I want to have a system like netflix where I ask users to log in with email and using my custom auth backend, store the user info.
So user logs in on iOS device and purchases the subscriptions, and now can login to android device and get access to pro features (or vice versa). Achieving this so far is not the problem. The problem comes with the discrepancy where the source of truth of purchases is linked to the android or iOS account and not my app’s login.
So imagine, customer A logins in android device with email - abc@email.com, and is also logged in his android id with the same email id, which is fine. But now if he logs out of my app and then log back in with another email id, say xyz@email.com, technically he should not have pro subscription. and since RC also stores both these users as separate account, the data I get from RC treats the user with xyz@email.com as a non-pro user.
But now if the xyz@email.com tries to purchase the subscription, he will get an error saying - You’re already subscribed to Pro, since his android account is still abc@email.com
I can try to get the system logged in user account and use that to tie in the same user in another platform, but iOS does not provide that info in the app (AFAIK, correct me if I am wrong).
What can I use to identify users using the same email id across platforms so that they can share the same subscriptions?
Or How do I restore purchase of a user on a platform who has purchased subscriptions from another platform?
What is the correct solution to this issue? Any help on this is appreciated.