-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Sessions in parse-server doesn't seem to work the way I expected sessions to work #3387
Comments
I too couldn't find anything in the documentation. However, I did find a response on this topic from @flovilmart in serverfault (see link below). The guidance is as follows:
http://serverfault.com/questions/787470/implement-expire-inactive-session-feature-in-parse-server I haven't tried it out yet, but I hope to do so this week. |
Hey, thanks for reporting this issue. Can you please add all the info specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported. |
I have a similar requirement (managing sessions across multiple tabs) and have been doing investigation into the matter. It appears that the I therefore think we would need to implement our own solution, and have conceptually come up with the following approach: Principle of Operation
client:On application start :
OnBeforeUnload: [tab closing/refreshing]
OnStorage [localStorage changed]
server:IAmEndingMySession() cloud function
PleaseDontCloseSession() cloud function
any feedback on the idea is appreciated (especially @flovilmart) - will report back once we have implemented... |
for anyone who reads this later... problem with the above approach is you cannot modify so have to create your own |
Hello Parse-Server elders
How are parse-server Sessions meant to work?
The way I thought Sessions work is that there is a timeout and a limit on the max session length. A timeout would be set to something like 30m, so if a client doesn't communicate with the server using the sessionToken at least once every 30m, then the session would timeout and the sessionToken would no longer be usable.
But if the client does communicate using the sessionToken continuously, then they can communicate with the server up to a max session length, e.g. 8 hours or something.
However in parse-server there seems to only be a single sessionLength property. When you communicate with the server using the sessionToken, the expiresAt value doesn't seem to be updated. So parse-server's sessionLength is what I have been referring to in my example as "max session length" is that right?
The concept of the shorter timeout to verify the health of the client isn't present in parse-server is that right?
Thanks
The text was updated successfully, but these errors were encountered: