Hello,
I am testing purchases in a sandbox environment and I don’t understand one thing (is this expected behavior ?) this is IOS app written in swift, using firebase for authentication
step1: A new user opens the app and chooses to sign in via Apple account (provided by firebase auth)
step2: They are presented with a paywall, they make the purchase and continue using the service.
step3: They press “logout” which triggers firebase auth sign out and
12Purchases.shared.logOut { custInfo, err in3 if let err = err {4 print("Error while logging out revenuecat: \(err.localizedDescription)")5 } else {6 print("Log out successful from revcat and firebase")7 completion(nil)8 }9 }
step4: The user logs in again via the same apple account
step5: The user is presented with a paywall again, even though the purchase was already made for this account.
I am setting the user’s ID after logging in to the firebase’s UID one:
12 Auth.auth().addStateDidChangeListener() { auth, user in3 if user != nil {4 self.signedIn = true5 Purchases.shared.logIn(user!.uid) { customerInfo, created, error in6 if let error = error {7 print("error occured: \(error.localizedDescription)")8 }9 print("created successful: \(created)")10 print("Logged in to revenuecat with userId successful")11 }12 print("Auth state changed, is signed in")13 } else {14 self.signedIn = false15 print("Auth state changed, is signed out")16 }17 }
Is this intended behavior?

