question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auth.federatedSignIn error: `AuthClass - Cannot get the current user because the user pool is missing.`

See original GitHub issue

Describe 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 )

gfgh

Below is how I have Amplify Auth configured: gfgh2

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:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
lorensrcommented, May 16, 2019

Mine was fixed by going from:

import Amplify from '@aws-amplify/core'
import config from './aws-exports'
Amplify.configure(config)

to

import Amplify from 'aws-amplify'
import config from './aws-exports'
Amplify.configure(config)
2reactions
vkulovcommented, Jan 24, 2019

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No current user for authenticated user in Amplify
The error is literally saying No current user - you need to sign in using the supported identity ...
Read more >
Use an existing Cognito User Pool and Identity Pool
Configure the Amplify CLI to use existing Amazon Cognito User Pool and Identity Pool resources as an authentication & authorization mechanism for other ......
Read more >
AWS-Amplify/Lobby - Gitter
federatedSignIn () does not create the user in the pool? ... [DEBUG] 01:32.12 AuthClass - Getting current session ... It is as if...
Read more >
AuthClass | amplify-js
new AuthClass(config: AuthOptions): AuthClass ... Initialize Auth with AWS configurations ... Get authenticated credentials of current user.
Read more >
The Complete Guide to User Authentication with the Amplify ...
Any update on the React Native version ? Been trying to make it work but stuck at when the hosted UI (using withOAuth...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found