mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-07 22:39:16 +00:00
11 lines
323 B
TypeScript
11 lines
323 B
TypeScript
import { redirect } from '@sveltejs/kit';
|
|
|
|
// Alias for /login/alternative/code
|
|
export function GET({ url }) {
|
|
let targetPath = '/login/alternative/code';
|
|
if (url.searchParams.has('redirect')) {
|
|
targetPath += `?redirect=${encodeURIComponent(url.searchParams.get('redirect')!)}`;
|
|
}
|
|
return redirect(307, targetPath);
|
|
}
|