Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix jwks body #697

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ app.post("/change-email", verifySession(), async (req: SessionRequest, res: expr
});
```

## [15.2.1] - 2023-09-22

### Fixes

- Fixes an issue where the response for the JWKs API would contain additional properties

## [15.2.0] - 2023-09-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/framework.BaseRequest.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/framework.BaseResponse.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/index.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/ingredients_emaildelivery.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/ingredients_smsdelivery.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_dashboard.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_emailpassword.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_emailverification.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_jwt.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_multitenancy.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_openid.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_passwordless.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_session.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdpartyemailpassword.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdpartypasswordless.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_usermetadata.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_userroles.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/interfaces/framework_awsLambda.SessionEvent.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/interfaces/framework_awsLambda.SessionEventV2.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/interfaces/recipe_session.SessionContainer.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/interfaces/recipe_session.VerifySessionOptions.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/framework.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/framework_awsLambda.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/framework_express.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/framework_fastify.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/framework_hapi.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/framework_koa.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/framework_loopback.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_dashboard.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_emailpassword.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_emailverification.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_jwt.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_multitenancy.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_openid.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_passwordless.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_session.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_thirdparty.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_thirdpartyemailpassword.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_thirdpartypasswordless.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_usermetadata.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_userroles.html

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion lib/build/recipe/jwt/api/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ function getAPIImplementation() {
if (resp.validityInSeconds !== undefined) {
options.res.setHeader("Cache-Control", `max-age=${resp.validityInSeconds}, must-revalidate`, false);
}
return resp;
return {
keys: resp.keys,
};
},
};
}
Expand Down
4 changes: 3 additions & 1 deletion lib/ts/recipe/jwt/api/implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default function getAPIImplementation(): APIInterface {
options.res.setHeader("Cache-Control", `max-age=${resp.validityInSeconds}, must-revalidate`, false);
}

return resp;
return {
keys: resp.keys,
};
},
};
}
2 changes: 1 addition & 1 deletion lib/ts/recipe/jwt/recipeImplementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function getRecipeInterface(
}
},

getJWKS: async function (): Promise<{ keys: JsonWebKey[]; validityInSeconds: number }> {
getJWKS: async function (): Promise<{ keys: JsonWebKey[]; validityInSeconds?: number }> {
const { body, headers } = await querier.sendGetRequestWithResponseHeaders(
new NormalisedURLPath("/.well-known/jwks.json"),
{}
Expand Down
1 change: 1 addition & 0 deletions test/jwt/getJWKS.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ describe(`getJWKS: ${printPath("[test/jwt/getJWKS.test.js]")}`, function () {
});

assert(response !== undefined);
assert(Object.keys(response).length === 1);
assert(response.keys !== undefined);
assert(response.keys.length > 0);
assert.strictEqual(headers["cache-control"], "max-age=60, must-revalidate");
Expand Down
Loading