Closed didemkkaslan closed 1 week ago
@didemkkaslan, thanks for opening this issue and sorry to hear you're running into this. Can you clarify if you only experienced this after a recent upgrade (I see you're using v6.6.4)? Also, can you share what your settings are the expiration of your access token, ID Token, and refresh tokens within your Cognito User Pool?
We occasionally have this error for a long time now but yes after we upgraded to amplify v6 and started to implement permission stuff based on the idtoken(scopes). Sometimes after a tokenRefresh_failure event user silently gots logged out ( tokens are being removed from cookie storage in this case ) I'm not sure if its related tho.
I've asked backend team and here is the info for tokens
access token expiry = 5 mins Id token expiry = 5 mins Refresh token expiry = 1 week
thanks bunch
@didemkkaslan I wanted to confirm that the behavior for Next JS works as expected as opposed to issue aws-amplify/amplify-ui#6057. The customer is not logged out after network error. Please note, the expected behavior was with default cookie storage implementation. If you have a custom implementation, it might need to handle error scenarios.
Hello @ashika112 the behaviour works as expected in version 6.8.0 tokens are not being deleted in this version. I was having this behaviour with 6.6.4 looks like my issue is solved with version upgrade
@didemkkaslan Thank you for confirming that fix works as of latest 6.8.0. I will close this issue in favor. Please let us know if you find anything else 👍
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
CDK
Environment information
Describe the bug
Hello Amplify team:
When the app is left running in the background for approximately 2-3 hours, I encounter the following error:
Here is the dedupedFetchAuthSession:
I refetch scopes using fetchAuthSession for permissions stuff when a user signs in or a token refresh occurs.
Expected behavior
fetchAuthSession shouldn't cause any errors
Reproduction steps
Put the app running in background , wait good amount of time
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response