Accounts.changePassword login with new token?

294 views
Skip to first unread message

Abigail Watson

unread,
Jan 8, 2015, 11:03:52 AM1/8/15
to meteo...@googlegroups.com
Hi Meteor Community,

Anybody know how to change the password from the client side and log in with the new token?  We keep getting the following error when we use Accounts.changePassword:

Error logging in with token: Error: You've been logged out by the server. Please log in again. [403]

We've tried logging in with the callback, but that doesn't seem to be working:

      Accounts.changePassword($('#oldPasswordInput').val(), $('#newPasswordInput').val(), function(){
        Meteor.loginWithPassword(username, password);
      })

Any ideas?
Thanks,
Abigail

Emily Stark

unread,
Jan 8, 2015, 12:52:49 PM1/8/15
to meteo...@googlegroups.com
Hi Abigail,

I'm not sure exactly what's going on but you shouldn't need to call `loginWithPassword` after calling `changePassword`: the connection will stay logged in as the current user.

Emily

--
You received this message because you are subscribed to the Google Groups "meteor-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meteor-talk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/meteor-talk/6dd20eb6-5ad4-4d05-bdd0-30101689d192%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Abigail Watson

unread,
Jan 8, 2015, 2:27:59 PM1/8/15
to meteo...@googlegroups.com
Hi Emily,
Thanks for the verification that the intended behavior is for them to stay logged in as the current user.  We have some custom logic in Accounts.onCreateUser() and Accounts.config() which I'm now thinking is causing the problem.  Off to audit some code...
-Abby

--
You received this message because you are subscribed to a topic in the Google Groups "meteor-talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/meteor-talk/oI0zxKtcCPs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to meteor-talk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/meteor-talk/CACXRNDEAckACKJWCnk65U%2ByGNSV3yDZqVaqwpGBexXn8NJrmbA%40mail.gmail.com.

Luca Mussi (@splendido)

unread,
Jan 23, 2015, 8:07:07 PM1/23/15
to meteo...@googlegroups.com
Hi Abigail,
Your call seems correct, if you verified you actually get pwds values, it is supposed to work.
Here is the same call done by useraccounts: it's exactly like yours...

hope this can help narrowing your search!

Luca
Reply all
Reply to author
Forward
0 new messages