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
|
// GET /auth/me — return current session info
|
||||||
if (pathname === "/auth/me" && method === "GET") {
|
if (pathname === "/auth/me" && method === "GET") {
|
||||||
const session = getSession(ctx.req);
|
const session = getSession(ctx.req);
|
||||||
if (!session) return jsonResponse({ authenticated: false, enrolled: false });
|
if (!session) return jsonResponse({ authenticated: false, enrolled: true });
|
||||||
return jsonResponse({
|
return jsonResponse({
|
||||||
authenticated: true,
|
authenticated: true,
|
||||||
enrolled: true,
|
enrolled: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user