diff --git a/lib/build/customFramework.js b/lib/build/customFramework.js index e83316624..72515b298 100644 --- a/lib/build/customFramework.js +++ b/lib/build/customFramework.js @@ -174,6 +174,10 @@ exports.getSessionDetails = getSessionDetails; async function getSessionForSSR(request, jwks) { 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 = recipe_1.default.getInstanceOrThrowError(); diff --git a/lib/ts/customFramework.ts b/lib/ts/customFramework.ts index e32d840de..a51894568 100644 --- a/lib/ts/customFramework.ts +++ b/lib/ts/customFramework.ts @@ -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();