Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS - Facebook/Firebase config error on signInWithCredential #74

Closed
bertbeck opened this issue Sep 1, 2019 · 1 comment
Closed

IOS - Facebook/Firebase config error on signInWithCredential #74

bertbeck opened this issue Sep 1, 2019 · 1 comment

Comments

@bertbeck
Copy link

bertbeck commented Sep 1, 2019

I'm getting the following error when I try to login in to Firebase using Facebook with my app. The Facebook login looks fine, credential gets set but FirebaseAuth.instance.signInWithCredential(credential) throws an exception. As far as I can tell app id and app secret are set properly in Firebase and match the Facebook settings. What else needs to be set correctly? Google login seems to work.

Code I'm using is this:

final facebookLogin = new FacebookLogin();
final facebookLoginResult = 
     await facebookLogin.logInWithReadPermissions(['email', 'public_profile']);
...

  case FacebookLoginStatus.loggedIn:
    print("LoggedIn");
    AuthCredential credential= FacebookAuthProvider.getCredential(accessToken: facebookLoginResult.accessToken.token );
    firebaseUser = await FirebaseAuth.instance.signInWithCredential(credential);
    break;

exception is thrown on:

    firebaseUser = await FirebaseAuth.instance.signInWithCredential(credential);

error is:

   PlatformException (PlatformException(ERROR_INVALID_CREDENTIAL, Unsuccessful 
   debug_token response from Facebook: {"error":{"message":"(#100) The App_id in the 
   input_token did not match the Viewing 
   App","type":"OAuthException","code":100,"fbtrace_id":"A9EbpMwrswKpp9SB-uyoPDh"}}, 
   null))

Any suggestions?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant