Skip to content

Commit 0416aa7

Browse files
Correctly read audience from the auth config (auth0-samples#358)
1 parent e9f0c0c commit 0416aa7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sample-01/api-server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const app = express();
99

1010
if (
1111
!authConfig.domain ||
12-
!authConfig.audience ||
13-
authConfig.audience === "YOUR_API_IDENTIFIER"
12+
!authConfig.authorizationParams.audience ||
13+
authConfig.authorizationParams.audience === "YOUR_API_IDENTIFIER"
1414
) {
1515
console.log(
1616
"Exiting: Please make sure that auth_config.json is in place and populated with valid domain and audience values"
@@ -28,7 +28,7 @@ app.use(
2828
);
2929

3030
const checkJwt = auth({
31-
audience: authConfig.audience,
31+
audience: authConfig.authorizationParams.audience,
3232
issuerBaseURL: `https://${authConfig.domain}`,
3333
});
3434

0 commit comments

Comments
 (0)