Closed gk-bbai closed 6 months ago
Hello, @gk-bbai 👋. Appreciate you opening this issue with such great context and details! We're currently investigating this and will mark it as a bug for now.
On a somehow related note, shouldn`t the user object that is returned have multiple properties on it? It currently only has username, userId and signInDetails. I am trying to get the jwt token, which is nowhere to be found.
On a somehow related note, shouldn`t the user object that is returned have multiple properties on it? It currently only has username, userId and signInDetails. I am trying to get the jwt token, which is nowhere to be found.
fetchAuthSession() has accessToken
and idToken
I have the same bug, it's very critical, users just drops from their login session
The worst part is that they can't log back in, because it tells
UserAlreadyAuthenticatedException: There is already a signed in user
Hello @gk-bbai . We released a fix on the latest version of the library. Can you try it out ? Please delete node_modules
and package.lock.json
file before upgrading the amplify
dependency.
closing due to inactivity and merge & release of #13153
Before opening, please confirm:
JavaScript Framework
Not applicable
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
The value returned by
getCurrentUser()
(and within thetoken
property of the value returned byfetchAuthSession()
) does not includesignInDetails
after a token refresh is triggered.Expected behavior
If the user is properly authenticated , either
signInDetails
should always be present or another way to get theloginId
needs to be added.Reproduction steps
In AWS cognito:
In a JavaScript client application:
signIn(...)
as normalgetCurrentUser()
signInDetails
propertygetCurrentUser()
signInDetails
propertyCode 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