apps/api: fix verify token

This commit is contained in:
vchikalkin 2024-05-14 15:54:23 +03:00
parent 83975b0520
commit 20b1aeda5c
2 changed files with 1 additions and 3 deletions

View File

@ -76,8 +76,6 @@ export class AppController {
}
private handleDefaultCheck(req: FastifyRequest, reply: FastifyReply, token: string) {
this.appService.checkToken(token);
const { aud } = this.appService.checkToken(token);
if (aud === 'auth') return this.handleError(req, reply);

View File

@ -8,7 +8,7 @@ export class AppService {
constructor(private readonly jwtService: JwtService) {}
public checkToken(token: string) {
return this.jwtService.decode<DecodedToken>(token);
return this.jwtService.verify<DecodedToken>(token);
}
public refreshToken(token: string) {