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

@ -28,8 +28,13 @@ const VALIDATE_RESET_2FA_LINK = gql`
`
const RESET_2FA = gql`
mutation reset2FA($userID: ID!, $secret: String!, $code: String!) {
reset2FA(userID: $userID, secret: $secret, code: $code)
mutation reset2FA(
$token: String!
$userID: ID!
$secret: String!
$code: String!
) {
reset2FA(token: $token, userID: $userID, secret: $secret, code: $code)
}
`
@ -154,6 +159,7 @@ const Reset2FA = () => {
}
reset2FA({
variables: {
token: token,
userID: userID,
secret: secret,
code: twoFAConfirmation