NotAuthorizedException Invalid login token. Couldn't verify signed token
See original GitHub issueDescribe the bug I’m using amplify-authenticator for Vue, and intermittently when I go to my app I will get a not authorized exception. Then I refresh (I don’t login again), and it works.
To Reproduce I’m not sure exactly how to reproduce this. I run into it about 3% of the time.
Expected behavior Authentication should not fail intermittently.
Code Snippet I’m not sure what code would be most relevant, but here is how I’m using the amplify-authenticator component:
<amplify-authenticator>
<amplify-sign-in
slot="sign-in"
header-text=""
username-alias="email"
submit-button-text="LOGIN"
hide-sign-up
></amplify-sign-in>
<div v-if="signedIn">
<Header />
<nuxt />
<Footer />
</div>
</amplify-authenticator>
Here is the response I get from the authentication request:
{"__type":"NotAuthorizedException","message":"Invalid login token. Couldn't verify signed token."}
And then when my app tries to make API calls after failing to authenticate:
{"message":"Missing Authentication Token"}
Please let me know if there’s any more information I can provide to help!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:19 (5 by maintainers)
Top GitHub Comments
Thank you for this @srchulo. Putting your thinking out there helped me solve my issue too. We are using Amplify to power a Chrome extension where the user signs in to the Options page and we pass the session data to the Context via local storage.
We had a similar issue where the token was expired so calls were failing and it was because we were calling
Auth.Credentials.set
which eventually calls Cognito with theGetIdCommand
which failed because the session needed to be refreshed. CallingAuth.currentSession
first seems to have cleared up the issue!@srchulo,
We are going to close this issue since we have not heard from you.
Please let us know if you still need support and provide current steps to reproduce if you haven’t already. We can reopen the issue to investigate further.
Thanks