-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Add config.expireInactiveSession to add support for non-expiring inactive sessions #1536
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
Add config.expireInactiveSession to add support for non-expiring inactive sessions #1536
Conversation
Current coverage is 92.31%@@ master #1536 diff @@
==========================================
Files 87 87
Lines 6148 6153 +5
Methods 1062 1062
Messages 0 0
Branches 1260 1263 +3
==========================================
+ Hits 5675 5680 +5
Misses 473 473
Partials 0 0
|
I don't think this is the behaviour we want. Being able to create a session that is already expired is useful to test your client-side code that handles session expiry. My recommendation would be to add an |
@steven-supersolid updated the pull request. |
I've made some of the suggested changes but didn't want to change the current default behavior. Please let me know what you think about this: Default: expireInactiveSessions = true, sessionLength = 1 year |
This looks good to me, cc @nlutsenko @gfosco for comments because this involves a new public API. |
I think I missed the following checks when expireInactiveSessions is false:
Will address tomorrow |
Adding that would be a much larger and probably backwards incompatible change. Probably to support the use case you want would require a major and backwards incompatible overhaul to sessions, which I would like to see, but probably not for awhile. Essentially I'd like to remove expiresAt from sessions and check for expiry by subtracting the expiration time from the current time and checking that against updatedAt or some other field. |
Having This looks good to me, and is helpful for testing, and when the security model of Parse Server is not required, so I am ok with this change. |
…ions # Conflicts: # src/Config.js # src/ParseServer.js
@steven-supersolid updated the pull request. |
Parse.com sets/deletes |
@steven-supersolid updated the pull request. |
@steven-supersolid updated the pull request. |
No description provided.