parent
82f31185a1
commit
126799dab9
|
@ -20,12 +20,7 @@ export class RefreshAuth {
|
|||
} catch (error) {
|
||||
throw new IllegalJWTError()
|
||||
}
|
||||
const found_user = found_users[0]
|
||||
delete found_user.password;
|
||||
newAuth.access_token = "ja"
|
||||
newAuth.access_token_expires_at = 5555555
|
||||
newAuth.refresh_token = "ja"
|
||||
newAuth.refresh_token_expires_at = 555555
|
||||
console.log(decoded["userid"]);
|
||||
const found_user = await getConnectionManager().get().getRepository(User).findOne({ id: decoded["userid"] });
|
||||
if (!found_user) {
|
||||
throw new UserNotFoundError()
|
||||
|
@ -33,6 +28,13 @@ export class RefreshAuth {
|
|||
if (found_user.refreshTokenCount !== decoded["refreshtokencount"]) {
|
||||
throw new RefreshTokenCountInvalidError()
|
||||
}
|
||||
console.log(found_user);
|
||||
// delete found_user.password;
|
||||
newAuth.access_token = "ja"
|
||||
newAuth.access_token_expires_at = 5555555
|
||||
newAuth.refresh_token = "ja"
|
||||
newAuth.refresh_token_expires_at = 555555
|
||||
|
||||
return newAuth;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue