2

The "Expire Inactive Session" feature is available in parse.com as per (http://blog.parse.com/announcements/announcing-new-enhanced-sessions/)

Apparently, it didn't make it into the open source parse server as per (https://github.com/ParsePlatform/parse-server/wiki/Compatibility-with-Hosted-Parse#session-features)

Does anyone have recommendations how to implement it in parse server? or any other way to get this feature implemented in cloud code?

HBruijn
  • 72,524
  • 21
  • 127
  • 192
user357126
  • 21
  • 1

2 Answers2

1

I came across your question just now with the same concern. Did you decide on a solution for that?

My current plan is to run an external daily nodejs script directly on top of mongodb with the logic of, well - searching for expired sessionTokens and removing them. The connection string would include readPreference=secondary to save cpu on the primary mongodb.

drorsun
  • 111
  • 3
0

When creating a new instance of ParseServer pass: expireInactiveSessions: true alongside the options.

You can configure the sessionLength too (in seconds)

flovilmart
  • 126
  • 3