parent
2d603a1467
commit
02236caa41
@ -35,6 +35,7 @@ export class CreateAuth {
|
|||||||
const found_user = found_users[0]
|
const found_user = found_users[0]
|
||||||
if (await argon2.verify(found_user.password, this.password + found_user.uuid)) {
|
if (await argon2.verify(found_user.password, this.password + found_user.uuid)) {
|
||||||
const timestamp_accesstoken_expiry = Math.floor(Date.now() / 1000) + 5 * 60
|
const timestamp_accesstoken_expiry = Math.floor(Date.now() / 1000) + 5 * 60
|
||||||
|
found_user.permissions = found_user.permissions || []
|
||||||
delete found_user.password;
|
delete found_user.password;
|
||||||
newAuth.access_token = jsonwebtoken.sign({
|
newAuth.access_token = jsonwebtoken.sign({
|
||||||
userdetails: found_user,
|
userdetails: found_user,
|
||||||
|
@ -28,6 +28,7 @@ export class RefreshAuth {
|
|||||||
if (found_user.refreshTokenCount !== decoded["refreshtokencount"]) {
|
if (found_user.refreshTokenCount !== decoded["refreshtokencount"]) {
|
||||||
throw new RefreshTokenCountInvalidError()
|
throw new RefreshTokenCountInvalidError()
|
||||||
}
|
}
|
||||||
|
found_user.permissions = found_user.permissions || []
|
||||||
delete found_user.password;
|
delete found_user.password;
|
||||||
const timestamp_accesstoken_expiry = Math.floor(Date.now() / 1000) + 5 * 60
|
const timestamp_accesstoken_expiry = Math.floor(Date.now() / 1000) + 5 * 60
|
||||||
delete found_user.password;
|
delete found_user.password;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user