Avevo un'app funzionante con Facebook & Funzionalità di accesso via email, poiché ho aggiornato la console Firebase (solo, il sdk non è stato aggiornare).L'accesso di Facebook non funziona più da quando ho aggiornato l'app Firebase alla nuova console (solo)
La versione dell'app prima del Firebase 3.0 funzionava prima, ma non è più possibile firmare/accedere a Facebook dopo che la console è stata aggiornata.
quello che ho fatto:
1 - aggiornato la console Firebase
A causa di Firebase & Facebook aggiornamento della console, ho anche dovuto mettere l'Oauth richiamata al Facebook App
2 - Incollato il Callback OAuth di Facebook di Firebase sulla console di Facebook (prima che fosse vuoto) `https://xxx.firebaseapp.com/__/auth/handler` `
L'eccezione:
Il Firebase Auth ascoltatore innescare un errore Firebase:
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\"}}"}}
Il Codice FirebaseError:
Nel codice decompilato del FirebaseAndroidSdk, l'oggetto di errore è:
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\"}}"}}"
con il codice decompilato:
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);
}
});
}
A livello AuthListener, il codice firebaseError: -20
https://www.firebase.com/docs/java-api/javadoc/com/firebase/client/FirebaseError.html
The specified authentication credentials are invalid.
Il Codice errore Facebook:
codice 400
niente di rilevante trovato qui: https://developers.facebook.com/docs/graph-api/using-graph-api/#errors
Il codice per 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));
}
}
}
GETTONE Validità:
Dal codice di cui sopra, il token viene confermata valida da:
https://graph.facebook.com/app?access_token=%7Byour_access_token%7D restituisce un JSON valido
E il Facebook strumento access token https://developers.facebook.com/tools/debug/accesstoken restituire un gettone ancora valido
Che cosa è cambiato dal punto di vista dell'utente:
ora, quando clicco sul FacebookLoginButton, ho una nuova finestra di dialogo che chiede "il collegamento come% FacebookUserName", con 2 bottoni ('sconnettersi' & 'Annulla')
ho inviato una segnalazione di bug a Firebase, ma anche se non so se questo è Facebook o Firebase, qualsiasi aiuto, consigli per esplorare nuova emissione la superficie o la soluzione sono benvenute.
Beh, da quando ho aggiornato a Firebase 3.0 Ho lo stesso problema con Google Accedi. Non ho aggiornato il mio SDK ma la console e ora non posso autorizzare con il token. Viene visualizzato l'errore "Credenziali di autenticazione non valide fornite". Pertanto sembra essere un problema di Firebase. – Durian
@Durian felice di sentirti, con un processo di autenticazione così complesso, non sei mai sicuro al 100% che il problema non sia dalla tua parte. Un bug è aperto per me, aggiungine uno per te per aumentare la consapevolezza del team di Firebase (ieri, uno mi ha detto che ero da solo da quello che ha sentito) https://firebase.google.com/support/contact/bugs-features/ – Anthony
Ehi! Sembra che tu abbia problemi. Puoi contattarmi all'indirizzo [email protected]? –