parent
2a1b65f424
commit
1850dd542d
|
@ -33,9 +33,7 @@ export class CreateAuth {
|
|||
} else {
|
||||
const found_user = found_users[0]
|
||||
console.log(found_user.password);
|
||||
// try {
|
||||
if (await argon2.verify(found_user.password, this.password + found_user.uuid)) {
|
||||
// password match
|
||||
// TODO: proper jwt creation
|
||||
const token = jsonwebtoken.sign({}, "securekey")
|
||||
newAuth.access_token = token
|
||||
|
@ -43,13 +41,8 @@ export class CreateAuth {
|
|||
newAuth.access_token_expires_at = 1587349200
|
||||
newAuth.refresh_token_expires_at = 1587349200
|
||||
} else {
|
||||
// password did not match
|
||||
throw new InvalidCredentialsError()
|
||||
}
|
||||
// } catch (err) {
|
||||
// // internal failure
|
||||
// }
|
||||
|
||||
}
|
||||
return newAuth;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue