Skip to content

Commit 37ea759

Browse files
committed
Test ignoring the audience for now
1 parent 23b7705 commit 37ea759

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/shared/modules/global/jwt.service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,13 @@ export class JwtService implements OnModuleInit {
9494
// Get the signing key from Auth0
9595
const signingKey = await this.getSigningKey(tokenHeader.kid);
9696

97+
98+
console.log(`Signing key: ${JSON.stringify(signingKey)}`);
99+
97100
// Verify options
98101
const verifyOptions: VerifyOptions = {
99102
issuer: AuthConfig.jwt.issuer,
100-
audience: AuthConfig.jwt.audience,
103+
//audience: AuthConfig.jwt.audience,
101104
clockTolerance: AuthConfig.jwt.clockTolerance,
102105
ignoreExpiration: AuthConfig.jwt.ignoreExpiration,
103106
};
@@ -111,12 +114,14 @@ export class JwtService implements OnModuleInit {
111114
} else {
112115
// In development, just decode the token without verification
113116
decodedToken = decode(token);
117+
114118
}
115119

116120
if (!decodedToken) {
117121
throw new UnauthorizedException('Invalid token');
118122
}
119123

124+
console.log(`Decoded token: ${JSON.stringify(decodedToken)}`);
120125
const user: JwtUser = { isMachine: false };
121126

122127
// Check for M2M token from Auth0

0 commit comments

Comments
 (0)