Skip to content

Commit

Permalink
Add a comment about acceptin jwks as a parameter for getSessionForSSR
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30-st committed Oct 4, 2024
1 parent 2d18d33 commit 564d9c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/build/customFramework.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions lib/ts/customFramework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ export async function getSessionForSSR(
const accessToken = getAccessToken(request);
const hasToken = !!accessToken;

// NOTE: We are accepting jwks as a parameter so that this function can
// be effectively tested.
// There's more details on why this is needed in the tests file where this
// function is being tested.
let jwksToUse = jwks;
if (!jwks) {
const sessionRecipe = SessionRecipe.getInstanceOrThrowError();
Expand Down

0 comments on commit 564d9c0

Please sign in to comment.