Próbuję zalogować się do Firebase, używając tego kodu, aby wygenerować dane uwierzytelniające Firebase.
func signIn(fromViewController controller: UIViewController) -> Promise<AuthCredential> {
return wrap { completion in
self.loginManager.logIn(withReadPermissions: ["public_profile"],
from: controller,
handler:completion)
}
.then { result -> AuthCredential in
if result.isCancelled {
throw NSError.cancelledError()
}
let token = result.token!
return FacebookAuthProvider.credential(withAccessToken:token.tokenString)
}
}
I odzyskanie tego błędu.
ERROR Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the error details for more information." UserInfo={error_name=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information., NSUnderlyingError=0x6040001cb050 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={
code = 400;
errors = (
{
domain = global;
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":"CCGlFkNF1pl"}}";
reason = invalid;
}
);
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":"CCGlFkNF1pl"}}";
}}}}
Skonfigurowałem swoją aplikację w obszarze deweloperskim na Facebooku iwyciąć i wkleić identyfikator aplikacji i tajny klucz do konfiguracji autoryzacji facebook w firebase. Tak więc utknąłem w tej chwili, co mogłem zrobić źle.
Ktoś napotkał ten problem?
Odpowiedzi:
1 dla odpowiedzi № 1czy włączyłeś Facebooka w konsoli Firebase?
W moich zaawansowanych ustawieniach w aplikacji na Facebooku włączałem "Czy aplikacja App Secret jest osadzona w kliencie? "
Wyłączenie tego sprawiło, że wszystko działało !!!!