Scenario 1:
User 1 purchases a product on my app with their Apple ID and logs out of both my app and their Apple ID. User 2 attempts to purchase the same product on my app with their unique member ID, but logged in to their iPhone with User 1's Apple ID. Upon attempted purchase, User 2 receives pop up saying that they have already purchased a subscription with the Apple ID with the two options "Manage" and "ok." In the background, paymentQueues are automatically calling multiple transactions and all are calling to "Purchased" block. As a result, User 2 is allotted with the subscription while the pop up appears.
Scenario 2:
User 1 purchases a product on my app with their Apple ID and logs out of both my app and their Apple ID. User 2 attempts to purchase the same product on the my app with their unique member ID, but logged in to their iPhone with User 1's Apple ID. At this point, we check the subscription existence by checking the recent transaction. If subscription expiry dates still exist or if it is in recurring mode, then right away we are serving a pop up communicating that the receipt has already been used. If the subscription is "Expired," we check our application Member ID with the original Transaction ID by calling our API. If these match, we are letting the user purchase the product. If not, we are not adding any paymentQueues and displaying a pop up which says "Receipt already used." However, the paymentQueues are calling automatically and calling the "purchased" block in paymentQueue. As a result, our API URLs are displaying transaction successful status and User 2 is allotted with the subscription.
How should we manage User 2?