-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Description
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.4
Facebook iOS SDK version
17.1.0
Dependency Manager
SPM
SDK Framework
Login
Goals
Authenticated login with Facebook app on iPhone and returns success
Expected results
The JWT containing AuthenticationToken.current?.tokenString after login must have a properly formatted title, body, and signature.
Actual results
Steps to reproduce
Set Up Facebook App and Run Sample Code
Code samples & details
// INSERT YOUR CODE HERE
func getFBToken() {
let nonce = UUID().uuidString
let loginManager = LoginManager()
// Ensure the configuration object is valid
guard let configuration = LoginConfiguration(
permissions:["public_profile"],
tracking: .limited,
nonce: nonce
) else {
return
}
loginManager.logIn(configuration: configuration) { result in
switch result {
case .failed(let error):
print("loginFaceBook failed: ")
case .cancelled:
print("loginFaceBook cancelled: ")
case .success(let grantedPermissions, let declinedPermissions, let token):
print("loginFaceBook success: ")
// getting id token string
let tokenString = AuthenticationToken.current?.tokenString
}
}
}