In my application i want to achieve the following flow
Actual flow:
User install the app → Purchase the subscription → Create account on our app → Get access to app
Issue:
User install the app → Purchase the subscription → Uninstall the app
Now when a user re install the app we are calling restore function of Revenue Cat to restore purchases just to verify if the device has any active purchases If any purchase found → navigate to sign up screen and if no purchase is found → navigate to purchase screen again
In our app launch we are calling Restore function which restore purchases to anonymous user which is creating a edge case, that every time the app is installed it restores the purchases and any user who sign up will be bind to that purchase with provided app user id, means its possible to create multiple accounts on same device/same purchase.
For-example: App launches, restore happens and if there is no logged in user, some another user will create an account on same active subscription because we are assuming that he is same that user who bought the subscription but did not sign up.
So how should I restrict the multiple accounts creation on same active subscription plan but at the same time also want to implement the above case when user purchase the subscription but did not create account?