mirror of
https://github.com/LukeHagar/idn-admin-console.git
synced 2025-12-06 04:20:02 +00:00
Update logout functionality to delete cookies with additional options
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
export const load = async ({ cookies }) => {
|
||||
cookies.delete('session', {
|
||||
path: '/'
|
||||
path: '/',
|
||||
httpOnly: false,
|
||||
secure: false
|
||||
});
|
||||
|
||||
cookies.delete('idnSession', {
|
||||
path: '/'
|
||||
path: '/',
|
||||
httpOnly: false,
|
||||
secure: false
|
||||
});
|
||||
|
||||
return { sessionLoggedOut: true };
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
onMount(() => {
|
||||
setTimeout(async () => {
|
||||
console.log('Redirecting to login...');
|
||||
await invalidateAll();
|
||||
goto('/');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user