0

When I use construction like

 ref.authWithOAuthPopup("facebook", function(error, authData) {
        console.log("User ID: " + authData.uid + ", Provider: " + authData.provider);
    }, {
        remember: "sessionOnly",
        scope: "email"
    });

All is working:

User ID: facebook:..., Provider: facebook 
User ID: google:..., Provider: google
.... and others.

When I use construction

 var authClient = $firebaseSimpleLogin(ref);
 authClient.$login("google", {
        remember: "sessionOnly"
    });

I see an error '400. That’s an error. Error: redirect_uri_mismatch'.

1 Answer 1

2

You have to properly set REDIRECT URIS in your Google Developers Console page.

Go to https://console.developers.google.com/, authenticate (:-), select APIs & Auth, Credentials, and fill REDIRECT URIS field with the url https://auth.firebase.com/auth/google/callback.

Sign up to request clarification or add additional context in comments.

4 Comments

I've used auth.firebase.com/v2/MYFIREBASE/auth/google/callback url. With auth.firebase.com/auth/google/callback login worked. But there is a warning FIREBASE WARNING: FirebaseRef.auth() being deprecated. Please use FirebaseRef.authWithCustomToken() instead. I didn't use this method = it means that authClient.$login("google"...) deprecated?
Are you using firebase 1.1?
Since Firebase 1.1 they undergo a code rewriting, including firebase-simple-login into firebase core, and changing a bit the APIs; and yes, login() is now deprecated, for auth(), authWith...(), onAuth()... I did try to upgrade my project to Firebase 1.1.1, but for the moment I stay with 1.0.x for some incompatibilities with my code base... More, if you use AngularFire, be sure it supports Firebase 1.1...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.