Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[changePassword]: Cannot change password multiple times #67

Open
joncursi opened this issue Jun 18, 2017 · 3 comments
Open

[changePassword]: Cannot change password multiple times #67

joncursi opened this issue Jun 18, 2017 · 3 comments

Comments

@joncursi
Copy link

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 a console.log(await userId()), it still shows the user's ID.

Why does this fail on the second time?

@joncursi
Copy link
Author

joncursi commented Jun 18, 2017

I'm using react native. Seems like this method does not automatically log the user in?

@joncursi
Copy link
Author

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.

@acomito
Copy link

acomito commented Feb 21, 2019

Hmm... this seemed to work for me in the past but not it's not working anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants