On the Parse JS changelog:
https://parse.com/docs/downloads
Removed the concept of the concept of the current user when running in
node.js Current users can be enabled in node with
Parse.User.enableUnsafeCurrentUser() Many requests now support passing an
explicit session token as an option
Unfortunately none of their documentation has been updated to support this.
You'll have to dig into their source code to see how { sessionToken } is
being used.
(Basically, in most calls to Parse, you can add sessionToken: <token> to
the backbone options)
To allow server side login as before, just paste this line somewhere before
the login
Parse.User.enableUnsafeCurrentUser();
Isen
On Friday, 24 July 2015 20:37:20 UTC+8, Jeremy May wrote:
>
> Somewhere between v1.4.1 and v1.5.0 on the parse npm, they made it so this
> error message is thrown. I just ran into this and was surprised because I'm
> running another server that logs in and has elevated credentials. I've also
> used node CLI as a way to add people to roles. I suddenly couldn't log in
> from Node on a new project I'm working on. I noticed my old project had
> 1.4.1 of the parse npm and the new project was using 1.5.0. I modified my
> package.json to force the 1.4.1 and its working again.
>
> On Sunday, July 19, 2015 at 6:56:23 PM UTC-4, Duncan Graham wrote:
>>
>> I'm getting the error, 'It is not possible to log in on a server
>> environment' when I try to post to /login (code below)
>>
>> Why is this the case? What's the logic in making people do this client
>> side? I can do Parse.User.signUp() on the server without any problems.
>>
>>
>>
>> app.post('/login', function (req, res) { var username = req.body
>> .username; var password = req.body.username; console.log(username)
>> Parse.User.logIn(
>> username, password, { success: function(user) { response.redirect('/') },
>> error: function(user, error) { console.log(error); } });})
>>
>
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/ef6c1048-8cfc-457f-b7a0-2d7e44184a6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.