firebaseui-web: signInSuccess callback doesn't work in 2.0 (works in 1.0)
So I have this code:
componentDidMount () {
this.ui = new firebaseui.auth.AuthUI(firebase.auth());
this.uiConfig = {
'signInSuccessUrl': 'http://localhost:3333',
'signInOptions': [
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.FacebookAuthProvider.PROVIDER_ID,
firebase.auth.TwitterAuthProvider.PROVIDER_ID,
firebase.auth.GithubAuthProvider.PROVIDER_ID,
firebase.auth.EmailAuthProvider.PROVIDER_ID
],
'signInFlow': 'popup',
callbacks: {
signInSuccess: function(currentUser, credential, redirectUrl) {
alert("Signed in as "+currentUser + " with credential " + credential);
this.setState({"modalIsOpen": false});
}.bind(this),
uiShown: function() {
alert("doing login stuff.");
}
}
};
}
Basically, in v1 of firebaseui, it works fine. I log in with a Firebase user, the signInSuccess callback is called, life is good. However with v2.0.0 it doesn’t work at all (whereas the test uiShown callback still works in both versions). I’d like to use the latest version of the component, but if it’s not going to let me do signin callbacks, I won’t be able to. I’ve looked through the docs and I don’t think there’s any implementation difference between v1 and v2, unless I’m missing something?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 17 (7 by maintainers)
My apologies, I noticed that my firebase was 3.6.8 and upgraded it to 4.1.1 and it works now.
Same here. Basically, uninstalled 1.0.1 using npm, installed 2.0.,0 using npm, and the callback function is NOT called. And no redirection.
Environment: