File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export const getCookieHeader = (
1313 domain ?: string ,
1414 path : string = "/" ,
1515) : string =>
16- `${ name } =${ value } ; ${ maxAge !== undefined ? `Max-Age=${ maxAge } ` : "" } ; ${ isSecure ? "Secure;" : "" } ${ isHttpOnly ? "HttpOnly;" : "" } ${ isSameSite ? ( ENV . ENV === "local" ? "SameSite=None;" : "SameSite=Strict;" ) : "SameSite=Lax;" } ${ path ? `Path=${ path } ;` : "" } ` ;
16+ `${ name } =${ value } ; ${ maxAge !== undefined ? `Max-Age=${ maxAge } ` : "" } ; ${ isSecure ? "Secure;" : "" } ${ domain ? `Domain= ${ domain } ;` : ENV . DOMAIN ? `Domain= ${ ENV . DOMAIN } ;` : "" } ${ isHttpOnly ? "HttpOnly;" : "" } ${ isSameSite ? ( ENV . ENV === "local" ? "SameSite=None;" : "SameSite=Strict;" ) : "SameSite=Lax;" } ${ path ? `Path=${ path } ;` : "" } ` ;
1717
1818export const getCartIdFromHeaders = ( headers : Headers ) : string | undefined => {
1919 const cookies = getCookies ( headers ) ;
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export const decodeJwt = async (
4848} ;
4949
5050export const getTokenCookie = ( token : string , remember ?: boolean ) : string =>
51- `${ CookieNameEnum . REFRESH_TOKEN } =${ token } ; Path=/; HttpOnly; Secure; ${ ENV . ENV === "local" ? "SameSite=None;" : "SameSite=Strict;" } ${ remember ? `Max-Age=${ TOKEN_COOKIE_MAX_AGE } ` : "" } ` ;
51+ `${ CookieNameEnum . REFRESH_TOKEN } =${ token } ; Path=/; HttpOnly; Secure; Domain= ${ ENV . DOMAIN } ; ${ ENV . ENV === "local" ? "SameSite=None;" : "SameSite=Strict;" } ${ remember ? `Max-Age=${ TOKEN_COOKIE_MAX_AGE } ` : "" } ` ;
5252
5353export const getLoggedInToken = async (
5454 userId : string ,
You can’t perform that action at this time.
0 commit comments