-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
signInStatus is 'NOT_SIGNED_IN' during refresh of token #166
Comments
Hi mate! The amazon-cognito-passwordless-auth/client/react/hooks.tsx Lines 333 to 334 in 10c6963
Which means you should see this (if you use the pre-built Passwordless component): amazon-cognito-passwordless-auth/client/react/components.tsx Lines 101 to 114 in 10c6963
Are you indeed using the pre-built Passwordless component? Does this work like that for you, but you're saying I don't want to see that page in this case? Else, if you do see You should not have to look at |
Hi! Thanks for the quick response. I just tried with the sample app and it behaves how you said it should, it goes straight to the |
I've noticed that if the token needs to refresh (i.e. I haven't used our app for more than an hour) then the login screen briefly appears while the token is refreshing. This is really annoying. It seems that
signInStatus
andsigningInStatus
go through these transitions:signInStatus: CHECKING signingInStatus: CHECKING_FOR_SIGNIN_LINK
signInStatus: NOT_SIGNED_IN signingInStatus: NO_SIGNIN_LINK
signInStatus: REFRESHING_SIGN_IN signingInStatus: NO_SIGNIN_LINK
signInStatus: SIGNED_IN signingInStatus: NO_SIGNIN_LINK
The
NOT_SIGNED_IN
status is messing us up and seems erroneous. I had a look at the code. I don't quite understand it but I think maybe a call tosetIsSchedulingRefresh(true)
would fix the problem? I don't see thatisSchedulingRefresh
is ever set to true. I think maybe it should be done just before line 205 of hook.tsx. What do you think?Btw to repro this you can either wait an hour or just edit
Passwordless.<longid>.expireAt
to be some old date, in local storage.Thanks!
The text was updated successfully, but these errors were encountered: