in src/server/lib/okta/tokens.ts [152:174]
maxAge: ms('1h'), // Expiry is set to 1 hour, which matches the token expiry
});
};
/**
* @name getOAuthTokenCookie
*
* Get a given OAuth Token cookie.
*
* If the cookie doesn't exist, or the signature failed
* verification then `null` is returned.
*
* @param {Request} req
* @param {OAuthCookieNames} name
* @return {string | undefined}
*/
export const getOAuthTokenCookie = (
req: Request,
name: OAuthCookieNames,
): string | undefined => {
// eslint-disable-next-line functional/no-let -- used to determine the cookie source, TODO: potential for refactoring to remove let
let cookieSource: 'cookies' | 'signedCookies';
if (process.env.RUNNING_IN_CYPRESS === 'true') {