3

The documentation for Parse.User.become() says that a single argument should be passed to become, a session token. Where, officially, does this session token come from for the JavaScript API?

I see no call to associate an arbitrary ID (like session cookie) with the Parse user object, so I assume it is the same session token return by the REST API, not one created by my own session manager.

So far I have only seen two ways to get this: a field user._sessionToken, and a field in the response to the REST API login call. The first is more convenient for me since I do not use the REST API directly so far, but it does have that underbar at the start of the name, indicating danger. However, I do not see explicit documentation of either one.

1 Answer 1

0

If you try to use Parse.User.become you get an error about it not being memory safe on the server. I found a workaround which is use Parse.User.current() but you have to call Parse.User.enableUnsafeCurrentUser() first.

Sign up to request clarification or add additional context in comments.

1 Comment

I think this will only work if your node application always uses the same Parse user. If you are creating your own RESTful layer to act on behalf of your clients, you will not be able to use this approach. That was my situation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.