Skip to content

Commit

Permalink
Clear localStorage when user signs out
Browse files Browse the repository at this point in the history
  • Loading branch information
franknoirot committed Oct 11, 2024
1 parent 5ae7e25 commit 241fc3d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/routes/(sidebarLayout)/+layout.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const load = async ({ cookies, request, url, fetch }) => {
*/
function signOut() {
cookies.delete(AUTH_COOKIE_NAME, { domain: DOMAIN, path: '/' })
localStorage.clear()
throw redirect(303, '/')
}
}

0 comments on commit 241fc3d

Please sign in to comment.