feat(auth): add /signup to public routes
Allow unauthenticated access to the signup page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,7 @@ describe('auth guard (hooks.server.ts handle)', () => {
|
|||||||
expect(resolve).toHaveBeenCalledWith(event);
|
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',
|
'allows public route %s without auth',
|
||||||
async (path) => {
|
async (path) => {
|
||||||
const { event, resolve } = createEvent(path);
|
const { event, resolve } = createEvent(path);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type { Handle } from '@sveltejs/kit';
|
|||||||
import { redirect } from '@sveltejs/kit';
|
import { redirect } from '@sveltejs/kit';
|
||||||
import { apiClient } from '$lib/server/api';
|
import { apiClient } from '$lib/server/api';
|
||||||
|
|
||||||
const PUBLIC_ROUTES = ['/login', '/register', '/invite'];
|
const PUBLIC_ROUTES = ['/login', '/register', '/signup', '/invite'];
|
||||||
|
|
||||||
const STATIC_PREFIXES = ['/_app/', '/favicon'];
|
const STATIC_PREFIXES = ['/_app/', '/favicon'];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user