Skip to content

Parse SDK and parse-server: missing documentation for node.js #1929

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

Closed
neophob opened this issue May 27, 2016 · 1 comment
Closed

Parse SDK and parse-server: missing documentation for node.js #1929

neophob opened this issue May 27, 2016 · 1 comment

Comments

@neophob
Copy link
Contributor

neophob commented May 27, 2016

Hi

I want to use parse-server in a nodejs express application. Are there any up to date documentations available for the nodejs version of the JS SDK? As the JS SDK documentation is for browser JS versions only, there are quite some differences when using nodejs like:

  • require('parse/node'); instead require('parse');
  • no Parse.User.current(); user

I have some issues with basic functions like:

  • how do I logout an active session?
  • how to verify if current session is valid?
  • how do I prevent that the session table create a new entry for each login (old session entry is not deleted if the same user on the same machine login again)?

I use the parse-server hosting from nodechef.com (latest server and dashboard versions)

@drew-gross
Copy link
Contributor

To logout a session, you just delete it from the _Session class. To verify if one is valid, you just make requests with it. If the requests succeed, it is valid (you could also query in the session class). You can't prevent a new session from being created on each login, as a new session on each login is pretty much the whole point of revocable sessions. You can periodically delete old sessions though, or delete all old sessions upon login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants