nestjs_auth...
This commit is contained in:
parent
0d4e2570fc
commit
df2349fc06
@ -18,10 +18,11 @@ export class LocalAuthGuard extends AuthGuard('local') {
|
|||||||
|
|
||||||
handleRequest(err, user, info) {
|
handleRequest(err, user, info) {
|
||||||
// You can throw an exception based on either "info" or "err" arguments
|
// You can throw an exception based on either "info" or "err" arguments
|
||||||
|
console.log('LocalAuthGuard.handleRequest().err =>' + err)
|
||||||
if (err || !user) {
|
if (err || !user) {
|
||||||
throw err || new UnauthorizedException()
|
throw err || new UnauthorizedException()
|
||||||
}
|
}
|
||||||
//console.log('LocalAuthGuard.handleRequest().info =>' + info)
|
console.log('LocalAuthGuard.handleRequest().info =>' + info)
|
||||||
return user
|
return user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user