( setCookie: ISetCookie, token: string, expiresAt: Date )
| 2 | import { COOKIE_OPTIONS } from '../constants'; |
| 3 | |
| 4 | export function setSessionTokenCookie( |
| 5 | setCookie: ISetCookie, |
| 6 | token: string, |
| 7 | expiresAt: Date |
| 8 | ): void { |
| 9 | setCookie('session', token, { |
| 10 | maxAge: Math.floor((expiresAt.getTime() - Date.now()) / 1000), |
| 11 | ...COOKIE_OPTIONS, |
| 12 | }); |
| 13 | } |
| 14 | |
| 15 | export function setLastAuthProviderCookie( |
| 16 | setCookie: ISetCookie, |
no test coverage detected