Limited log in is failing with error: FBSDKErrorDeveloperMessageKey=Invalid ID token from login response.
StefiGx opened this issue · comments
Checklist before submitting a bug report
- I've updated to the latest released version of the SDK
- I've searched for existing GitHub issues
- I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- I've read the Code of Conduct
- This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
15.2
Facebook iOS SDK version
17.0.0
Dependency Manager
CocoaPods
SDK Framework
Login
Goals
Figure out how to fix the issue of users not being able to log in using Facebook.
Expected results
Getting help on why the issue is happening and pointer how to fix it.
Actual results
I have updated our FBSDKLoginKit
to the latest version (17.0.0
) and followed all of the instructions in the documentation for implementing limited log in.
The problem I am experiencing is that when trying to call the login method I get this error message: FBSDKErrorDeveloperMessageKey=Invalid ID token from login response. I am using LoginConfigurations
passing as permissions public_profile
and email
and tracking set to .limited
as such:
let manager = LoginManager()
let configuration = LoginConfiguration(permissions: ["public_profile", "email"], tracking: .limited)
manager.logIn(viewController: viewController, configuration: configuration) { result in
switch result {
case .success:
guard let authToken = AuthenticationToken.current?.tokenString else {
callback(.failure(FacebookError()))
return
}
callback(.success(authToken))
case .cancelled:
callback(.failure(FacebookError()))
case let .failed(error):
callback(.failure(error as NSError))
}
}
I get the same result even when using the previous login method but on the new version of the SDK:
let manager = LoginManager()
manager.logIn(permissions: "public_profile", "email", from: viewController) { result, error in
if let error = error {
callback(.failure(error as NSError))
} else if let result = result, !result.isCancelled {
guard let authToken = AuthenticationToken.current?.tokenString else {
callback(.failure(FacebookError()))
return
}
callback(.success(authToken))
} else {
callback(.failure(FacebookError()))
}
}
I am getting this error even if I set the tracking to enabled and even if I accept ATT or not the behaviour is consistent.
Any updates on this?