fix: last auth provider cookie (wrong domain)
This commit is contained in:
@@ -7,7 +7,17 @@ export function setSessionTokenCookie(
|
||||
expiresAt: Date
|
||||
): void {
|
||||
setCookie('session', token, {
|
||||
maxAge: Math.floor((expiresAt.getTime() - new Date().getTime()) / 1000),
|
||||
maxAge: Math.floor((expiresAt.getTime() - Date.now()) / 1000),
|
||||
...COOKIE_OPTIONS,
|
||||
});
|
||||
}
|
||||
|
||||
export function setLastAuthProviderCookie(
|
||||
setCookie: ISetCookie,
|
||||
provider: string
|
||||
): void {
|
||||
setCookie('last-auth-provider', provider, {
|
||||
maxAge: 60 * 60 * 24 * 365,
|
||||
...COOKIE_OPTIONS,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user