How to get JWT from Facebook credentials using Amazon Cognito user pool?

社会主义新天地 提交于 2021-02-08 03:25:32

问题


I've got credentials for Facebook after federated login with aws, but after successful login I was not getting any response or jwt token.

I've tried with AWS Cognito authentication and tried with AWSCognitoCredentials provider but didn't found any solution

AWSCognitoCredentialsProvider(regionType: AWSRegionType.USEast1, identityPoolId: "us-east-1:xxxxxxxxx", identityProviderManager: CredentialProviderClass).credentials().continueWith { (task) -> Any? in

            DispatchQueue.main.async {

                if (task.error != nil) {
                    print("Error : \(task.error?.localizedDescription ?? "")")
                } else {
                    // the task result will contain the identity id
                    if let credentials = task.result {
                        print(credentials)
                    }
                }
            }

            return nil
        }

I am expecting JWT token after login to Facebook with successful authentication.

来源:https://stackoverflow.com/questions/57971807/how-to-get-jwt-from-facebook-credentials-using-amazon-cognito-user-pool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!