mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-24 10:47:55 +00:00
SPRINT-1 related tasks done
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { UnauthorizedException } from '@nestjs/common';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
|
||||
export class RefreshTokenGuard extends AuthGuard('jwt-refresh') {
|
||||
handleRequest(err, user) {
|
||||
if (err || !user) {
|
||||
throw err || new UnauthorizedException();
|
||||
}
|
||||
return user;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user