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

resetPassword callback converts response text to an object #310

Closed
Markus-ipse opened this issue Jan 13, 2017 · 4 comments
Closed

resetPassword callback converts response text to an object #310

Markus-ipse opened this issue Jan 13, 2017 · 4 comments

Comments

@Markus-ipse
Copy link

I have the following code:

  public resetPassword() {
    const resetOptions = {
      email: this.user.email,
      connection: this.user.identities[0].connection
    };
    this.webAuth.changePassword(resetOptions, (err, response) => {
      console.log(response); // see screenshot below
    });
  }

It works fine and the reset email is sent out, but the response looks as follows:
image

@Markus-ipse
Copy link
Author

Seems like the server sends the header Content-Type:application/json; charset=utf-8 while the actual response body is just a string.

@glena
Copy link
Contributor

glena commented Jan 13, 2017

Yes already reproduced and seeing internally how to properly fix it
thx for reporting (will try to publish a patch on monday)

@Markus-ipse
Copy link
Author

A patch for the service endpoint or for Auth0.js?

Just asking as it seems like it's the service that needs to be fixed so that it's Content-type actually matches the response.

@glena
Copy link
Contributor

glena commented Jan 13, 2017

I am committing to release a patch for Auth0.js by monday

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