Closed woodpav closed 6 years ago
const DOMAIN = "localhost"
If you found this issue while trying to fix this 'bug' and @woodpav's answer not working - try to set secure
property of CookieStorage to false.
new CookieStorage({ domain: 'localhost', secure: false })
Expected Behavior
After authenticating and refreshing the page,
pool.getCurrentUser()
should return the user instead ofnull
.Actual Behavior
User is successfully authenticated and tokens are retrieved. Storage is set in
CognitoUserPool
andCognitoUser
on construction but callingpool.getCurrentUser()
returns null.Code
Maybe worth noting that cookies are blank. (However if I set cookies through
js-cookies
it works as expected.)