diff options
feat: oidc attempt 82845345
Diffstat (limited to 'src/routes/logout/+server.ts')
| -rw-r--r-- | src/routes/logout/+server.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/routes/logout/+server.ts b/src/routes/logout/+server.ts new file mode 100644 index 0000000..4880c2a --- /dev/null +++ b/src/routes/logout/+server.ts @@ -0,0 +1,14 @@ +import { base } from '$app/paths'; +import { redirect } from '@sveltejs/kit'; + +export const GET = (event) => + redirect( + 307, + `${base}/login/undo${ + event.url.searchParams.get('next') + ? `?next=${encodeURIComponent( + event.url.searchParams.get('next') ?? '/' + )}` + : '' + }` + ); |