fix(panel): show login screen instead of enrollment page for unauthenticated users
Some checks failed
Deploy to Production / test (push) Failing after 28s
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user