Open joncursi opened 7 years ago
I'm using react native. Seems like this method does not automatically log the user in?
Yes this seems to be the case. Current workaround is:
await changePassword({
newPassword,
oldPassword,
}, apolloClient);
await loginWithPassword({
password: newPassword,
username: data.me.username,
}, apolloClient);
But this is dirty for two reasons:
1) You have to do an initial round trip to the server to get the user's username
to login with
2) You have to do another round trip to the server after changing the password to re-log the user in with their username / email and new password.
Hmm... this seemed to work for me in the past but not it's not working anymore.
When I use
changePassword
the first time, it works.If I go immediately back to the form and do a
changePassword
again, it says "Must be logged in". If I do aconsole.log(await userId())
, it still shows the user's ID.Why does this fail on the second time?