Closed brcbydr closed 4 years ago
signIn(withCustomToken token:)
is used for custom token auth i.e JWT in your case you are using Facebbok auth which is totally different from custom token auth.
Instead use:
signInAndRetrieveData(with credential:)
to authenticate using AuthCredential
. However, this will be deprecated in the next version and will be replaced with signIn(with:)
.
So stick with signIn(withCustomToken token:)
for now until next version release.
Hi all, Below signIn function with custom token waiting AuthCredential parameter not String in FirebaseAuth.
func signIn(withCustomToken token: String) -> Observable<AuthDataResult>
Because the token's type which created with GoogleProvider, FacebookProvider etc. is AuthCredential.
let credential = FacebookAuthProvider.credential(withAccessToken: accessToken.tokenString)
Could you help me please?