I wanted to ask if anyone could direct me to an example or explanation of how can I add a phone login for firebase using Facebook’s Account Kit.
I am getting accessToken from facebook account kit and then try to authorize like this
fileprivate func authorizeWithAccessToken(_ accessToken: AKFAccessToken?, phoneNumber: AKFPhoneNumber?, error: NSError?) {
guard let accessToken = accessToken else {
return
}
FIRAuth.auth()?.signIn(withCustomToken: accessToken.tokenString) { (user, error) in
if (error != nil) {
print(error?.localizedDescription)
} else {
print("User logged in")
}
}
}
But I am getting error:
"The custom token format is incorrect. Please check the documentation." UserInfo={NSLocalizedDescription=The custom token format is incorrect. Please check the documentation., error_name=ERROR_INVALID_CUSTOM_TOKEN})
Here my token:
EMAWeGCejpgSijO0ncgBYl7HxLTZBy0rWrwaHihA81ZB286EEPhdZCtDSWZAnajp8pmX10E1ZCJDV7Ghwz0NrxRMhZCgSPzZC9imjbamk8bvv2AZDZD