Parse.com - How to login as a user without knowing their password?
javascript, parse-platform
Solution
If you secure it enough, you can essentially do this by using Cloud Code. I'll skip over the validation/authorization part, and focus on how.
A cloud function, which, running with the Master Key, can query for a user. The cloud function returns the users session token to the client (user.getSessionToken()), which uses the "become" functionality to log in as that user.
Relevant posts:
Announcing the "become" feature: http://blog.parse.com/2013/12/03/bring-your-own-login/
Tutorial that covers an implementation of cloud code providing a session token: https://parse.com/tutorials/adding-third-party-authentication-to-your-web-app
Problem
I'm using Parse.com, and like it a lot. I'd like users of my app to automatically be assigned an account (which I create behind the scenes using the Parse API) and then log them into their account. I could easily do this if I assigned them a hard coded, standard password for their account, e.g superPass123. Is this the only way I can do this? Or is there some other way to allow me to login automatically as a user without knowing a users password, if my user has "super" rights?