sst.dev icon indicating copy to clipboard operation
sst.dev copied to clipboard

"Auth.currentSession()" - "No userPool" error

Open Selimonder opened this issue 7 years ago • 4 comments

Hello people, Hardcore JS plus AWS noob here. Appreciating the guide that you are presenting, and following it step by step. However, I am facing with an issue that I cannot wrap my head around.

The summary of the issue is, I am very well able to use functions such as login and sign up via aws-amplify(Auth), however, each time the app page get refreshed, my auth state is returning as logged out plus I am receiving "No userPool" error as prompt as well as on console. I am certain that I have entered correct information to "config.js" file. Error is occurring while I am trying to catch current session via "Auth.currentSession()" function. Any ideas?

Selimonder avatar Apr 16 '18 17:04 Selimonder

@Selimonder Can you tell me after which step you are getting this error?

jayair avatar Apr 16 '18 18:04 jayair

@jayair https://serverless-stack.com/chapters/load-the-state-from-the-session.html

exactly in this step.

Selimonder avatar Apr 16 '18 18:04 Selimonder

@Selimonder Can you make sure you have this line - https://github.com/AnomalyInnovations/serverless-stack-demo-client/blob/master/src/index.js#L12 in your src/index.js?

jayair avatar Apr 16 '18 18:04 jayair

Thank you, it is fixed. (I think there was an issue with order)

Selimonder avatar Apr 16 '18 18:04 Selimonder