Firebase Integration : user identity login/logout

  • 10 June 2022
  • 0 replies


Good morning,

We’re looking at the Firebase Integration documentation here : 

In the section about setting the Firebase User Identity in RevenueCat. 


    // Add state change listener for Firebase Authentication
Auth.auth().addStateDidChangeListener { (auth, user) in

if let uid = user?.uid {

// identify Purchases SDK with new Firebase user
Purchases.shared.logIn(uid, { (info, created, error) in
if let e = error {
print("Sign in error: \(e.localizedDescription)")
} else {
print("User \(uid) signed in")

It is clear that you call logIn when the user id is available. 

However, why don’t yo call logOut when it is not? 

Is there a reason? We just want to get our implementation right / complete and from an remote point of view, it feels incomplete. 

Thank you

0 replies

Be the first to reply!