question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

signInSuccess callback doesn't work in 2.0 (works in 1.0)

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
brandonmikeskacommented, Sep 11, 2017

My apologies, I noticed that my firebase was 3.6.8 and upgraded it to 4.1.1 and it works now.

1reaction
wguttmncommented, May 30, 2017

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:

  • React
Read more comments on GitHub >

github_iconTop Results From Across the 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.
Read more >
firebaseui signInSuccess redirect in callback - Stack Overflow
I'd worked around the problem by redirecting to a holding page, which checked for user . If it was truthy, it redirected to...
Read more >
firebaseui__pt_br - npm Package Health Analysis | Snyk
Firebase and FirebaseUI do not work when executed directly from a file (i.e. ... Required when the signInSuccessWithAuthResult callback is not used or...
Read more >
Using OpenID Connect to Authenticate to an Android App
This article assumes that you have working knowledge of Kotlin (or Java), and have some knowledge of authentication principles. The main steps are:...
Read more >
createuserwithemailandpassword firebase but not signed the ...
isSuccessful()) { // Sign in success, update UI with the signed-in user's information ... firebase createUserWithEmailAndPassword is not working in android.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found