amplify-swift: `signInWithWebUI` not working after adding CognitoIdentity information on Amplify configuration
I encountered an issue when using signInWithWebUI. Previously, this method worked, and I could successfully sign in with signInWithWebUI. However, after adding CognitoIdentity information to the Amplify configuration, the WebUI shows the error below:
[ℹ️][CognitoController.swift]:359 9 signOutLocally(callback:) -> Local signout successful: true [ℹ️][CognitoController.swift]:363 11 signOutLocally(callback:) -> Signed out successfully 2024-07-03T05:45:44+0800 info CognitoIdentityClient : [Logging] Request: POST https:443 Path: / X-Amz-Target: AWSCognitoIdentityService.GetId, Content-Type: application/x-amz-json-1.1, Host: cognito-identity.us-east-2.amazonaws.com, Content-Length: 6111, User-Agent: aws-sdk-swift/1.0 ua/2.0 api/cognito_identity#1.0 os/ios#17.4.1 lang/swift#5.10 cfg/retry-mode#legacy nil 2024-07-03T05:45:48+0800 info CognitoIdentityProviderClient : [Logging] Request: POST https:443 Path: / X-Amz-Target: AWSCognitoIdentityProviderService.RevokeToken, Content-Type: application/x-amz-json-1.1, User-Agent: aws-sdk-swift/1.0 ua/2.0 api/cognito_identity_provider#1.0 os/ios#17.4.1 lang/swift#5.10 cfg/retry-mode#legacy, Content-Length: 1894, Host: cognito-idp.us-east-2.amazonaws.com nil [‼️][CognitoController.swift]:275 11 presentSignInWebUI(_:callback:) -> AuthError: Not authorized error Recovery suggestion: Check whether the given values are correct and the user is authorized to perform the operation
I’m using CognitoIdentity to fetch the identity provider and get the provider name.
Interestingly, we tested the same code on Android, and it works as expected. I can sign in using the signInWithWebUI method without any issues on Android.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (11 by maintainers)
@jmanalang3 Would you be able to host this on Github and provide access to my Github account?