Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Đăng nhập Facebook không hoạt động với IOS #2471

Open
5 tasks done
vuongbachthu opened this issue Sep 10, 2024 · 0 comments
Open
5 tasks done

Đăng nhập Facebook không hoạt động với IOS #2471

vuongbachthu opened this issue Sep 10, 2024 · 0 comments

Comments

@vuongbachthu
Copy link

Checklist before submitting a bug report

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

Always open login form
IMG_0102

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
            }
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant