Ich hatte eine funktionierende App mit Facebook & E-Mail-Login-Funktion, da ich die Firebase-Konsole aktualisieren (nur, die SDK war nicht aktualisieren).Die Facebook-Anmeldung funktioniert nicht mehr, seit ich die Firebase-App auf die neue Konsole aktualisiert habe (nur)
Die App-Version vor der Firebase 3.0 funktionierte vorher, aber es ist nicht mehr in der Lage, mit Facebook zu signieren/loggen, nachdem die Konsole aktualisiert wurde.
Was ich getan habe:
1 - Verbesserte die Firebase Konsole
Wegen Firebase & Facebook-Konsole zu aktualisieren, ich hatte auch den Oauth Rückruf an die Facebook-App
setzen2 - Pasted the Firebase Facebook OAuth Rückruf an die Facebook-Konsole (bevor es ungültig war) `https://xxx.firebaseapp.com/__/auth/handler` `
Die Ausnahme:
Der Feuerbasis Auth Hörer ein Firebase Fehler auslösen:
Invalid authentication credentials provided. and Facebook : {"providerErrorInfo":{"code":400,"message":"Unsuccessful debug_token response from Facebook: {\"error\":{\"message\":\"(#100) You must provide an app access token or a user access token that is an owner or developer of the app\",\"type\":\"OAuthException\",\"code\":100,\"fbtrace_id\":\"DG4lLRJHFBS\"}}"}}
Der FirebaseError Code:
Im dekompilierten Code des FirebaseAndroidSdk, ist das Fehlerobjekt:
0 = {[email protected]} "code" -> "INVALID_CREDENTIALS"
1 = {[email protected]} "message" -> "Invalid authentication credentials provided."
2 = {[email protected]} "details" -> "{"providerErrorInfo":{"code":400,"message":"Unsuccessful debug_token response from Facebook: {\"error\":{\"message\":\"(#100) You must provide an app access token or a user access token that is an owner or developer of the app\",\"type\":\"OAuthException\",\"code\":100,\"fbtrace_id\":\"BtB3JF2qmku\"}}"}}"
mit die dekompilierten Code:
private void makeAuthenticationRequest(String urlPath, Map<String, String> params, AuthResultHandler handler) {
final AuthenticationManager.AuthAttempt attempt = this.newAuthAttempt(handler);
this.makeRequest(urlPath, HttpRequestType.GET, params, Collections.emptyMap(), new RequestHandler() {
public void onResult(Map<String, Object> result) {
Object errorResponse = result.get("error");
String token = (String)Utilities.getOrNull(result, "token", String.class);
if(errorResponse == null && token != null) {
if(!AuthenticationManager.this.attemptHasBeenPreempted(attempt)) {
AuthenticationManager.this.authWithCredential(token, result, attempt);
}
} else {
FirebaseError error = AuthenticationManager.this.decodeErrorResponse(errorResponse);
AuthenticationManager.this.fireAuthErrorIfNotPreempted(error, attempt);
}
}
public void onError(IOException e) {
FirebaseError error = new FirebaseError(-24, "There was an exception while connecting to the authentication server: " + e.getLocalizedMessage());
AuthenticationManager.this.fireAuthErrorIfNotPreempted(error, attempt);
}
});
}
Auf AuthListener Ebene der firebaseError Code: -20
https://www.firebase.com/docs/java-api/javadoc/com/firebase/client/FirebaseError.html
The specified authentication credentials are invalid.
Die Facebook-Fehlercode:
Code 400
Nichts relevant hier: https://developers.facebook.com/docs/graph-api/using-graph-api/#errors
Der Code für Authing:
public void authWithFirebase(final String provider, Map<String, String> options) {
if (options.containsKey(AUTH_OPTIONS_ERROR)) {
EventBus.getDefault().post(new MessageToDisplayEvent(options.get(AUTH_OPTIONS_ERROR), true));
} else {
if (provider.equalsIgnoreCase(AUTH_PROVIDER_TWITTER)) {
// if the provider is twitter, we must pass in additional options, so use the options endpoint
ref.authWithOAuthToken(provider, options, new AuthResultHandler(provider));
} else {
// if the provider is not twitter, we just need to pass in the oauth_token
ref.authWithOAuthToken(provider, options.get(AUTH_OPTIONS_TOKEN), new AuthResultHandler(provider));
}
}
}
TOKEN Gültigkeit:
Aus dem obigen Code wird der Token bestätigt gültig seit:
https://graph.facebook.com/app?access_token=%7Byour_access_token%7D geben Sie einen gültigen JSON
zurückund die Facebook-Tool AccessToken https://developers.facebook.com/tools/debug/accesstoken ein noch gültig TOKEN
zurückkehrt Was aus Sicht des Benutzers geändert:
jetzt, wenn ich auf dem FacebookLoginButton klicken, ich habe einen neuen Dialog, die „Verbindung fragen as% FacebookUserName ", mit 2 Tasten (" Unconnect "&" Cancel ")
Ich habe einen Fehlerbericht bei Firebase, aber ich weiß nicht, ob dies Facebook oder Firebase, jede Hilfe ist, beraten für die Erforschung neuer Ausgabe Oberfläche oder Lösung ist willkommen.
Nun, da ich 3,0 bis Feuerbasis aufgerüstet habe ich das gleiche Problem mit Google Anmelden. Ich habe mein SDK nicht aktualisiert, aber die Konsole und jetzt kann ich nicht mit dem Token autorisieren. Ich erhalte den Fehler 'Ungültige Authentifizierungsdaten angegeben'. Daher scheint es ein Firebase-Problem zu sein. – Durian
@Durian glücklich, Sie zu hören, mit solch komplexen Auth-Prozess, Sie sind nie 100% sicher, dass das Problem nicht an Ihrer Seite ist. Ein Bug ist offen für mich, bitte fügen Sie einen für Sie hinzu, um das Bewusstsein des Firebase-Teams zu erhöhen (gestern sagte mir einer, ich sei allein von dem, was er hörte) https://firebase.google.com/support/contact/bugs-features/ – Anthony
Hey! Klingt so, als ob du in Schwierigkeiten gerätst. Kannst du mich unter [email protected] erreichen? –