diff options
| author | Fuwn <[email protected]> | 2023-09-13 02:00:54 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-13 02:00:54 -0700 |
| commit | 60f0c6282f6d6cd291dc2909b534365902289e39 (patch) | |
| tree | 05cf24b11d63725f8f3e2f966aa2fa697e2bf90f /src/routes/api/authentication-log-out/+server.ts | |
| parent | refactor(oauth): move to single path (diff) | |
| download | due.moe-60f0c6282f6d6cd291dc2909b534365902289e39.tar.xz due.moe-60f0c6282f6d6cd291dc2909b534365902289e39.zip | |
refactor(auth): move to single path
Diffstat (limited to 'src/routes/api/authentication-log-out/+server.ts')
| -rw-r--r-- | src/routes/api/authentication-log-out/+server.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/routes/api/authentication-log-out/+server.ts b/src/routes/api/authentication-log-out/+server.ts new file mode 100644 index 00000000..22ef49d8 --- /dev/null +++ b/src/routes/api/authentication-log-out/+server.ts @@ -0,0 +1,7 @@ +import { redirect } from '@sveltejs/kit'; + +export const GET = ({ cookies }) => { + cookies.delete('user', { path: '/' }); + + throw redirect(303, '/'); +}; |