Skip to main content
Question

Firebase Integration : user identity login/logout


Forum|alt.badge.img+5

Good morning,


We’re looking at the Firebase Integration documentation here : https://docs.revenuecat.com/docs/firebase-integration 


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

Here:

    // 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!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings