Adjust audience e add log env
This commit is contained in:
@@ -13,9 +13,8 @@ export class KeycloakAuthGuard extends AuthGuard('jwt') {
|
||||
info: unknown,
|
||||
context: import('@nestjs/common').ExecutionContext,
|
||||
): TUser {
|
||||
this.logger.log(`User: ${JSON.stringify(user)}`);
|
||||
this.logger.log(`Error: ${JSON.stringify(err)}`);
|
||||
this.logger.log(`Info: ${JSON.stringify(info)}`);
|
||||
this.logger.log(`KEYCLOAK_URL: ${process.env.KEYCLOAK_URL}`);
|
||||
this.logger.log(`NODE_ENV: ${process.env.NODE_ENV}`);
|
||||
|
||||
if (err || !user) {
|
||||
if (err instanceof UnauthorizedException) {
|
||||
|
||||
@@ -45,6 +45,7 @@ export class KeycloakJwtStrategy extends PassportStrategy(Strategy, 'jwt') {
|
||||
}),
|
||||
algorithms: ['RS256'],
|
||||
issuer: `${baseUrl}/realms/clipperia`,
|
||||
audience: 'account',
|
||||
ignoreExpiration: false,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user