-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Unauthenticated identity throws AuthError without user pool #10039
Comments
The error comes from checking for a user pool here: https://github.com/aws-amplify/amplify-js/blob/main/packages/auth/src/Auth.ts#L1639
It is triggered from a failed https://github.com/aws-amplify/amplify-js/blob/main/packages/auth/src/Auth.ts#L1737 Unauthenticated federated shouldn't be checked against user pool. |
this is also happening to me Everything works fine but as @jmparsons explained very well, the conditional does not take into account the possibility of having Auth configured with just an IdentityPoolId. |
Hi Jonathan, The code is inside a try-catch and is there to make sure that the user is given UnAuth credentials. Although an error is being logged, the functionality is still the same. I have submitted a pull request to fix this issue and remove the logging of the error when a user pool is not present. Thanks, |
Hi @jmparsons @kevohagan, This fix was released in the 2022-08-01 Amplify release: aws-amplify@4.3.30. Thanks, |
Awesome tyvm @khatruong2009! Works great on my |
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication, GraphQL API
Amplify Categories
auth
Environment information
Describe the bug
The Auth modules throws an AuthError when using only identity pool to authorize unauthenticated access. It seems to fallback from checking for federated user to a cognito user - we are not using anything cognito, no user pools - solely identity pools.
Expected behavior
There should be no errors thrown if authentication is using unauthenticated access with identity pools - and no requirements to have a user pool at all.
Reproduction steps
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: