DrakaSAN DrakaSAN - 1 year ago 82
Javascript Question

Need help clarifying Parse.User.setPassword documentation

I am trying to implement two way to reinitialize a user password in a JS application using Parse.

Since I'll need a way to directly set the password, I searched Parse.User documentation for a function to update the password field, hoping to know if I am supposed to hash it myself, and how I should use it.

Unfortunately, the official documentation is quite unhelpful:

Boolean setPassword( password, options )

set("password", password, options)
and returns the result.




A Backbone-style options object.


What I was expecting to know was if I was supposed to hash the password before providing it, if there is a difference between
, and which options are available.

Answer Source

After trying and testing, I can conclude that:

  • setPassword() is just a shortcur of set('password')
  • The options available are the common ones: useMasterKey, sessionToken...
  • Setting the password automatically hash it.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download