-
Notifications
You must be signed in to change notification settings - Fork 118
logoutTimer causing early logouts #404
Comments
Have you confirmed that the JWT's exp attribute is correct? Paste your token into JWT.io and it will decode the payload. |
Hmm... this shouldn't be happening but I'll have to probe this a bit more. We typically don't set our JWTs to that long a length. Usually they are at most 1 day in case they are ever compromised. Otherwise you're going to probably keep a blacklist or whitelist. |
I am hitting the same issue with jwt.expiresIn="90d". If I set it to "1d" it works, though. |
This might be the same issue as #458 |
Weird. They do seem similar. It's impossible to test though because we can't realistically wait more than 20 days to test this. It is not recommended that you set JWT |
I think we can test it by trying to see what |
|
Looking at the code again I think I see a couple potential issues. I think the placement of the A few things that may be causing problems:
What do you think @daffl? |
I think this has all been fixed (with #534 as the last issue). |
Steps to reproduce
From the
source/socket/handler.js
I haven't looked deeply into this, but the
logoutTimer
function seems to be prematurely logging out the user immediately after being authenticated.Commenting it out fixes the problem.
Expected behavior
The user should not be logged out
Actual behavior
The user is logged out
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
NodeJS version:
7.2
Operating System:
Mac 10.11.6
Browser Version:
Chrome latest
React Native Version:
0.39
Module Loader:
The text was updated successfully, but these errors were encountered: