firebaseui-web: Chrome extension signInSuccess never called

I’m developing a chrome extension and trying to signup/login with email/password inside browser_action popup. The UI shows correctly, and flow seems to work as expected. During signup, user is created in the associated firebase application, however signInSuccess is never called. Neither it’s called if I try to login that user after the sign up. No error in console, nothing on UI - the login progress bar shows and hides in a second.

As per onAuthStateChanged, user is alwasy null:

firebase.auth().onAuthStateChanged(function (user) {
   console.log(user)
   alert(user)
});

What am I missing here?

From the code below, alert(“uiShow”) is shown, but alert(“Signed in as …”) never

the auth code:

uiConfig = {
    signInSuccessUrl: 'http://google.com',
    signInOptions: [
        {
            provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,
            requireDisplayName: false
        }
    ],
    signInFlow: 'popup',
    callbacks: {
        signInSuccess: function (currentUser, credential, redirectUrl) {
            alert("Signed in as " + currentUser + " with credential " + credential);
            return false;
        }.bind(this),
        uiShown: function () {
            alert("uiShow");
        }
    },
    tosUrl: 'http://google.com'

};

var ui = new firebaseui.auth.AuthUI(firebase.auth());
// The start method will wait until the DOM is loaded.
ui.start('#firebaseui-auth-container', uiConfig);

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

You’re welcome. Thanks for reporting this issue! The fix is in the repo. We’ll probably do a release next week with some other stuff. In the meantime, you can continue using the gstatic version.