🧹 clean up CreateAuth

ref #12
This commit is contained in:
Philipp Dormann 2020-12-05 11:22:59 +01:00
parent 2a1b65f424
commit 1850dd542d
1 changed files with 0 additions and 7 deletions

View File

@ -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;
}