FirebaseUI Auth - Facebook Login Error: Failed Facebook debug_token response

I am trying to integrate the FirebaseUI Auth library. Logging in to Google and logging in to the email system are working fine, but I had a problem setting up my Facebook login. This is my code:

user = firebaseAuth.getCurrentUser(); if (user != null) { startMainActivity(); finish(); } else { startActivityForResult( AuthUI.getInstance() .createSignInIntentBuilder() .setIsSmartLockEnabled(!BuildConfig.DEBUG) .setProviders(Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(), new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(), new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER).build())) .build(), RC_SIGN_IN); } 

When I click the facebook button, all the login processes go well (in my facebook profile I see the application in the list of my applications), but firebase does not create a user and I am stuck on the login page. In Android Monitor, I have the following lines (the application does not crash):

 E/CredentialSignInHandler: Unexpected exception when signing in with credential com.google.firebase.FirebaseException: An internal error has occurred. [ Unsuccessful debug_token response from Facebook ] at com.google.android.gms.internal.zzblv.zzce(Unknown Source) at com.google.android.gms.internal.zzbls$zzj.zza(Unknown Source) at com.google.android.gms.internal.zzbmd.zzcf(Unknown Source) at com.google.android.gms.internal.zzbmd$zza.onFailure(Unknown Source) at com.google.android.gms.internal.zzbly$zza.onTransact(Unknown Source) at android.os.Binder.execTransact(Binder.java:453) 

The error that Firebase shows is only a β€œDebug_token from Facebook Failed Response” without any code or error message ... I don't know what to do.

Thanks for the help!

+9
source share
8 answers

I have the same problem, the facebook auth on firebase function was turned on, but pointed to a different application identifier, which is different from the one I'm working on.

Therefore, you need to make sure that the application ID from "firebase console / authentication / sign in method / facebook" matches the application ID on your facebook console.

I took a few hours to understand, I hope this is useful.

+8
source

Go to the Facebook developers page and select your application from the drop-down menu. Then go to " Settings" β†’ "Advanced" and find out if App Secret is built into the application? select No from the toggle button and done. Please refer to this link if you are having difficulty finding an option. Facebook Login failed: Facebook debug_token failed response

+5
source

I had the same problem and resolved it after re-checking App Secret in the upper right corner of the screen on the Facebook developers page. Make sure that the Secret application in Firebase Authentication (Facebook provider) is the same as the application secret on the Facebook developers page.

secret application for Facebook developers

+3
source

You need to check both: application secret and application identifier on the Facebook developers page and Firebase Authentication (Facebook provider), since Firebase has its own identifiers by default

+1
source

I had the same problem and could not figure it out for hours. This is most likely the wrong App-ID in your firebase (facebook) authorization configuration. In my case, I entered the package name of my application instead of the App-ID on Facebook. Hope it helps.

application setup in the Firebase console

0
source

For me, resetting App Secret did the trick. Go to ' Settings --> Basic and click 'Reset' next to 'App Secret'

0
source

I did not have a switch saying "Yes" to "This is a native or desktop application." Then I re-entered the application secret in Firebase and made sure that I added the UA OAuth Redirect URI to the Facebook application.

0
source

make sure this is correct on the Facebook developer page

enter image description here

0
source

Source: https://habr.com/ru/post/1266612/


All Articles