Open sushantdhiman opened 2 years ago
Just ran into it.
I am trying to use LOCAL persistence in an Expo React Native app (riamuapp.com).
firebase.auth().setPersistence(firebase.auth.Auth.Persistence.SESSION)
.then(() => {
firebase
.auth()
.signInWithEmailAndPassword(email, password)
.then(() => {
// success
})
.catch(error => {
setError({ title: 'Wrong Password', message: error.message });
});
})
.catch((error) => {
setError({ title: error.code, message: error.message });
});
Same issue in a Nextjs 14.1 app using your exact code in the readme. Didn't do anything special to set persists and cookies are not disabled.
Describe your environment
Arch Linux
103.0.2 (64-bit)
6.x
9.10.0
Describe the problem
The following error is thrown when using
Persistence.NONE
and trying to create an auth instance on a browser which has its cookies disabled.I believe the root cause behind this is the following code.
https://github.com/firebase/firebaseui-web/blob/51c8f7a4397f9e504460937cb950bbc282c7bf4e/javascript/widgets/authui.js#L144-L148
As you can see, this code tries to set
Persistence.SESSION
even when I have previously setPersistence.NONE
in myfirebase/auth
instance.Steps to reproduce:
localhost:3001
in my case.auth
toPersistence.NONE
and then try to create firebaseui auth instance.How to fix:
I believe
this.tempAuth_.setPersistence
should be using persistence information fromfirebase.auth
instance passed to it.