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

accounts.resetPassword seems to be outdated #43

Open
bmxpiku opened this issue Nov 8, 2019 · 1 comment
Open

accounts.resetPassword seems to be outdated #43

bmxpiku opened this issue Nov 8, 2019 · 1 comment

Comments

@bmxpiku
Copy link

bmxpiku commented Nov 8, 2019

https://developers.gigya.com/display/GD/accounts.resetPassword+REST

You are required to pass only one of the parameters either loginID or passwordResetToken.
If passwordResetToken is passed then the newPassword parameter is also required.

and currently interface looks like this:

export interface AccountsResetPasswordParams {
    loginID: string;
    passwordResetToken: string;
    newPassword: string;
    secretAnswer: string;
    securityFields: string;
    email?: string;
    lang?: string;
    sendEmail?: string;
}

so creating API action like this is not possible:

const options ={
loginID: '[email protected]',
sendEmail: false,
}
const token = await gigya.accounts.resetPassword(options);
if (token.statusCode !== 200) {
      throw Error('message');
    }
const responseReset = await gigya.accounts.resetPassword({
      sendEmail: false,
passwordResetToken: token.passwordResetToken,
newPassword: password,
    });
if (responseReset.statusCode === 200) {
      return 'success';
    }

Could you please update interface?

@kiranjthomas
Copy link

kiranjthomas commented Oct 1, 2020

i just ran into this issue today. are there any plans to address updating the interface?

per Gigya's documentation, two calls to resetPassword are required. in the first call, gigya just needs loginID.

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