apps/api: fix verify token
This commit is contained in:
parent
83975b0520
commit
20b1aeda5c
@ -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);
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user