fix: security flaw on auth tokens, error handling

This commit is contained in:
Sérgio Salgado 2021-04-06 19:12:36 +01:00 committed by Josh Harvey
parent 40974dd501
commit c00249586d
12 changed files with 185 additions and 144 deletions

View file

@ -26,8 +26,8 @@ const VALIDATE_RESET_PASSWORD_LINK = gql`
`
const RESET_PASSWORD = gql`
mutation resetPassword($userID: ID!, $newPassword: String!) {
resetPassword(userID: $userID, newPassword: $newPassword)
mutation resetPassword($token: String!, $userID: ID!, $newPassword: String!) {
resetPassword(token: $token, userID: $userID, newPassword: $newPassword)
}
`
@ -114,6 +114,7 @@ const ResetPassword = () => {
onSubmit={values => {
resetPassword({
variables: {
token: token,
userID: userID,
newPassword: values.confirmPassword
}