Auth.federatedSignIn error: `AuthClass - Cannot get the current user because the user pool is missing.`
See original GitHub issueDescribe the bug
Auth.federatedSignIn
throws a console error AuthClass - Cannot get the current user because the user pool is missing.
, but works as expected finally by authenticating successfully after that.
I have AWS Identity pool configured with OpenID Connection as Auth provider to authenticate for multiple Google ClientIds. I am not using any cognito user-pool.
From my react-native app, using Amplify SDK, I call Auth.federatedSignIn
passing it the idToken obtained from Google SignIn. Everything is working good, AWS finally authenticates successfully and allows to access lambdas.
Expected behavior
Auth.federatedSignIn
should authenticate without throwing any console error
Screenshots ( the error is highlighted in console in below gif )
Below is how I have Amplify Auth configured:
Smartphone (please complete the following information):
- Device: [iPhone Simulator, Android Simulator ]
- OS: [ iPhone X simulator 12.1, Android Nexus 5x API28]
Additional context “aws-amplify”: “^1.1.19”, “aws-amplify-react-native”: “^2.1.7”
Tried removing/adding above packages to have latest versions.
You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = ‘DEBUG’; in your app.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:15 (7 by maintainers)
Top GitHub Comments
Mine was fixed by going from:
to
We are getting the same thing.
AuthClass - Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID
This page suggests that user pool id is optional. https://aws-amplify.github.io/docs/js/authentication#manual-setup
On the other hand this code suggests that it’s not optional: https://github.com/aws-amplify/amplify-js/blob/master/packages/auth/src/types/Auth.ts#L36
We want to use an identity pool without specifying a user pool. Inside that identity pool we want to add 3 user pools as Cognito Authentication Providers. Is this possible?