I am using firebase authentication in my app. I want to redirectUser to a particular page if the user signs in for the first time or just signs up. Can somebody please tell me how to do this?
I you are using a identity provider, such as Google Sign-In or Facebook Login the only way to do that is to store an atributte where you kept the information needed to check if is the first login or not.
If you're using a password based account you can call the function to redirect after creating the user.
firebase.auth()
.createUserWithEmailAndPassword(email, password)
.then(() => {
//MyFunction
}).catch((error) => {
//Handle the error
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With