mirror of
https://github.com/LukeHagar/ui-development-kit.git
synced 2025-12-06 04:21:49 +00:00
Allowed secure httpOnly cookies
This commit is contained in:
@@ -76,9 +76,7 @@ export function getTokenDetails(cookies: Cookies): TokenDetails | undefined {
|
||||
|
||||
export function setTokenDetails(cookies: Cookies, tokenDetails: TokenDetails) {
|
||||
cookies.set('tokenDetails', encrypt(JSON.stringify(tokenDetails)), {
|
||||
path: '/',
|
||||
httpOnly: false,
|
||||
secure: false
|
||||
path: '/'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -120,15 +118,11 @@ export async function refreshToken(
|
||||
|
||||
export async function logout(cookies: Cookies) {
|
||||
cookies.delete('session', {
|
||||
path: '/',
|
||||
httpOnly: false,
|
||||
secure: false
|
||||
path: '/'
|
||||
});
|
||||
|
||||
cookies.delete('idnSession', {
|
||||
path: '/',
|
||||
httpOnly: false,
|
||||
secure: false
|
||||
path: '/'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -36,9 +36,7 @@ export const load: PageServerLoad = async ({ url, cookies, locals }) => {
|
||||
});
|
||||
|
||||
cookies.set('idnSession', encrypt(JSON.stringify(response.data)), {
|
||||
path: '/',
|
||||
httpOnly: false,
|
||||
secure: false
|
||||
path: '/'
|
||||
});
|
||||
|
||||
return { counterList };
|
||||
|
||||
@@ -2,15 +2,15 @@ import { generateLogoutLink } from '$lib/utils/oauth.js';
|
||||
|
||||
export const load = async ({ cookies, locals }) => {
|
||||
cookies.delete('session', {
|
||||
path: '/',
|
||||
httpOnly: false,
|
||||
secure: false
|
||||
path: '/'
|
||||
});
|
||||
|
||||
cookies.delete('idnSession', {
|
||||
path: '/',
|
||||
httpOnly: false,
|
||||
secure: false
|
||||
path: '/'
|
||||
});
|
||||
|
||||
cookies.delete('tokenDetails', {
|
||||
path: '/'
|
||||
});
|
||||
|
||||
console.log('Logging out');
|
||||
|
||||
Reference in New Issue
Block a user