From 56fc7e605290cdb66267b254c21c7e13345eb24b Mon Sep 17 00:00:00 2001 From: Marcel Raddatz Date: Thu, 2 Apr 2026 14:39:17 +0200 Subject: [PATCH] feat(auth): add /signup to public routes Allow unauthenticated access to the signup page. Co-Authored-By: Claude Opus 4.6 --- frontend/src/hooks.server.test.ts | 2 +- frontend/src/hooks.server.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/hooks.server.test.ts b/frontend/src/hooks.server.test.ts index 708071e..68fab8a 100644 --- a/frontend/src/hooks.server.test.ts +++ b/frontend/src/hooks.server.test.ts @@ -42,7 +42,7 @@ describe('auth guard (hooks.server.ts handle)', () => { expect(resolve).toHaveBeenCalledWith(event); }); - it.each(['/login', '/login/', '/register', '/invite/abc123'])( + it.each(['/login', '/login/', '/register', '/signup', '/signup/', '/invite/abc123'])( 'allows public route %s without auth', async (path) => { const { event, resolve } = createEvent(path); diff --git a/frontend/src/hooks.server.ts b/frontend/src/hooks.server.ts index 0f60418..df32645 100644 --- a/frontend/src/hooks.server.ts +++ b/frontend/src/hooks.server.ts @@ -2,7 +2,7 @@ import type { Handle } from '@sveltejs/kit'; import { redirect } from '@sveltejs/kit'; import { apiClient } from '$lib/server/api'; -const PUBLIC_ROUTES = ['/login', '/register', '/invite']; +const PUBLIC_ROUTES = ['/login', '/register', '/signup', '/invite']; const STATIC_PREFIXES = ['/_app/', '/favicon'];