diff --git a/src/session/getIdTokenRaw.js b/src/session/getIdTokenRaw.js index cbc0600..47a3203 100644 --- a/src/session/getIdTokenRaw.js +++ b/src/session/getIdTokenRaw.js @@ -14,5 +14,5 @@ import {sessionManager} from './sessionManager'; // @ts-ignore export const getIdTokenRawFactory = (req, res) => async () => { - return await sessionManager(req, res).getSessionItem('id_token'); + return await (await sessionManager(req, res)).getSessionItem('id_token'); }; diff --git a/src/session/isAuthenticated.js b/src/session/isAuthenticated.js index 7c8bbf6..930896f 100644 --- a/src/session/isAuthenticated.js +++ b/src/session/isAuthenticated.js @@ -9,9 +9,9 @@ import {sessionManager} from './sessionManager'; * @returns {() => Promise} */ export const isAuthenticatedFactory = (req, res) => async () => { - const accessToken = await sessionManager(req, res).getSessionItem( - 'access_token' - ); + const accessToken = await ( + await sessionManager(req, res) + ).getSessionItem('access_token'); const validToken = isTokenValid(accessToken);