fix(panel): show login screen instead of enrollment page for unauthenticated users
Some checks failed
Deploy to Production / test (push) Failing after 28s

/auth/me was returning enrolled: false for all unauthenticated requests,
causing the frontend to show the NotEnrolled page before login. Enrollment
is already enforced server-side during the OAuth callback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
syntaxbullet
2026-04-02 13:45:37 +02:00
parent 0c3b289ba0
commit b832723d6b

View File

@@ -225,7 +225,7 @@ async function handler(ctx: RouteContext): Promise<Response | null> {
// GET /auth/me — return current session info
if (pathname === "/auth/me" && method === "GET") {
const session = getSession(ctx.req);
if (!session) return jsonResponse({ authenticated: false, enrolled: false });
if (!session) return jsonResponse({ authenticated: false, enrolled: true });
return jsonResponse({
authenticated: true,
enrolled: true,