No log in required?

  • 31 March 2024
  • 1 reply


The functionality I am looking for is the user does not have to log in, they can just choose a subscription plan, double click and pay with Apple Pay. Why are we logging in manually with our email and password in this tutorial?

Here’s how the user logs in:

logIn(BuildContext context, String newAppUserID) async {
try {

await Purchases.logIn(newAppUserID);
// user types in newAppUserId manually

String appUserID = await Purchases.appUserID;
// And we get an id of the user

} on PlatformException catch (e) {


This post has been closed for comments

1 reply

Userlevel 4
Badge +6

Hey @mikheil-468325,

It’s not required for you to have a log in system for users, only for them to be identified in some fashion with app user ids - if you do not provide an app user id, then the Purchases SDK will automatically generate an anonymous app user id on configuration:

Additionally, if you’re not requiring users to create an account, I’d recommend making sure you have a ‘Restore Purchases’ button easily accessible for users, and your restore behavior set to “Transfer to new App User ID” to ensure your users are not never locked out of their content: