AuthClass - getting session failed: "No userPool"
See original GitHub issue** Which Category is your question related to? ** Auth/Cognito/Storage ** What AWS Services are you utilizing? ** Auth/Cognito/Storage ** Provide additional details e.g. code snippets ** I’m fairly new to AWS and am having some issues. Currently when logging into our app the user has the ability to view and upload files to our S3 bucket using Storage.put(). When closing and reopening the app, although the user appears to be signed in, they no longer have the ability to view or upload the files. When trying to upload, an Access Denied error is thrown.
It seems that the session isn’t persisting after closing and reopening, and logs this:
[DEBUG] 23:00.862 AuthClass - getting current authenticted user [DEBUG] 23:00.866 AuthClass - cannot load federated user from auth storage [DEBUG] 23:00.866 AuthClass - get current authenticated userpool user [DEBUG] 23:00.875 AuthClass - getting session failed: "No userPool"} [DEBUG] 23:00.885 Credentials - setting credentials for guest
Logging out, then back in fixes it, and the user is able to view and upload files again. We’re using the withAuthenticator HOC:
export default withAuthenticator(App, false, [ <SignIn />, <ConfirmSignIn />, <VerifyContact />, <RequireNewPassword />, <ForgotPassword /> ]);
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
@Evokator , in case you have configured your user pool properly and your app suddenly stopped working, upgrade your aws-amplify and aws-amplify-react to latest versions. I had a similar problem yesterday and upgrading to latest solved the issue.
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels or Discussions for those types of questions.