Shotstash
API referenceGraphQL referenceMutations

Complete Password Reset

Public: sets a new password with a reset token.

Public: sets a new password with a reset token.

Arguments

resetToken*String!

Token from verifyPasswordResetCode.

newPassword*String!

The new password.

confirmPassword*String!

The new password again.

  1. returns

Result of a self-service password reset step (code sent by email).

success*Boolean!

True when the step succeeded.

message?String

Human-readable message, null when none.

resetToken?String

Set only by a successful verifyPasswordResetCode: single use, valid for 10 minutes.

errorCode?String

Failure kind: UNAVAILABLE, RATE_LIMITED, INVALID_EMAIL, INVALID_CODE, CODE_LOCKED, TOKEN_INVALID, PASSWORD_TOO_SHORT, PASSWORD_TOO_LONG, PASSWORD_MISMATCH or INTERNAL; null on success.

attemptsLeft?Int

INVALID_CODE only: wrong tries left before the code is cancelled.

mutation CompletePasswordReset($resetToken: String!, $newPassword: String!, $confirmPassword: String!) {  completePasswordReset(    resetToken: $resetToken    newPassword: $newPassword    confirmPassword: $confirmPassword  ) {    success    message    resetToken    errorCode    attemptsLeft  }}