Skip to content

accounts.resetPassword seems to be outdated #43

@bmxpiku

Description

@bmxpiku

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions