0
votes

I am integrating Facebook login with Firebase in my iOS app.

I have followed all steps mentioned here: https://firebase.google.com/docs/auth/ios/facebook-login

I make sure that Facebook sign in is enabled on Firebase and that App ID and App secret are identical to those on Facebook developers project settings. I have also added OAuth redirect URI to project settings on Facebook developers.

When I try to login, FBSDKLoginManagerLoginResult is correct. It returns nil error and there is an access token returned back.

The problem is when I try to authenticate this user with Firebase:

let credential = FacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)

    Auth.auth().signInAndRetrieveData(with: credential) { (authResult, error) in
        if let error = error {
            // ...
            return
        }
        // User is signed in
        // ...
        // User is signed in
    }

It always returns this error message:

message = "Unsuccessful debug_token response from Facebook: {\"error\":{\"message\":\"Invalid OAuth access token signature.\",\"type\":\"OAuthException\",\"code\":190,\"fbtrace_id\":\"ELDLAecGcTE\"}}";

I have tried many solutions and all in vain. I have also converted my app status to Live and used Test User account created on Facebook developers page and still get the same error.

Any solution ?

1

1 Answers

0
votes

did you validate your Key to get the token?

token response

you're missing one step maybe check again, it shouldn't happend