2021年1月5日星期二

How do I prevent activation of in-app subscriptions when user logs in with a different account?

I am developing an Android/iOS application that uses Ionic and In App Purchase 2 to allow users to purchase a monthly or yearly subscription. This subscription is then tied to their account (which they register from the application) using the purchase token, together with the expiration date.

The problem I am facing is that, when user A purchases a subscription with phone A, the Google / Apple account associated with phone A and user A is both associated with the purchase, so when user A logs out, and user B logs in on the app with the same phone, user B has not yet purchased a subscription, so when they try to purchase, In App Purchase 2 sets the status automatically to Approved / Owned, since the Google / Apple account associated with phone A has already purchased the subscription, and this fools the app into thinking that user B has also purchased the subscription, so activating the subscription for user B.

How do I prevent multiple users from logging into the app and re-using the subscription associated with the Google / Apple account? I would be very thankful for any hints or tips regarding this.

This might be a confusing question, and I apologize if that is the case.

I would be grateful for any assistance. Thank you in advance!

https://stackoverflow.com/questions/65589229/how-do-i-prevent-activation-of-in-app-subscriptions-when-user-logs-in-with-a-dif January 06, 2021 at 10:07AM

没有评论:

发表评论