currentSession return null at login
yukulele opened this issue · 0 comments
yukulele commented
at login time, if you make call to currentSession()
and make a 2nd call before first is resolved, you get null
way to reproduce the bug
- add this piece of code to demo/components/AuthButtons.js :
auth.currentSession().then(session => console.log('currentSession 1', session))
auth.currentSession().then(session => console.log('currentSession 2', session))
auth.currentSession().then(session => console.log('currentSession 3', session))
- exec
npm run start:demo
- click "Log in" button
- finalize login process
expected result
console should display:
"currentSession 1", Object {...}
"currentSession 2", Object {...}
"currentSession 3", Object {...}
actual result
console show:
"currentSession 2", null
"currentSession 3", null
"currentSession 1", Object {...}