From a5717ec4d4da9ef0ad3be7c36014a1e29b9a188f Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 24 Feb 2026 23:39:19 +0000 Subject: [PATCH] Fall back to username for auth-menu email param Existing sessions have email=None since the field was just added. Username IS the email in Art-DAG (OAuth returns user.email as username). Co-Authored-By: Claude Opus 4.6 --- l1/app/__init__.py | 2 +- l2/app/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/l1/app/__init__.py b/l1/app/__init__.py index 408983b..3b945b3 100644 --- a/l1/app/__init__.py +++ b/l1/app/__init__.py @@ -170,7 +170,7 @@ def create_app() -> FastAPI: from artdag_common.fragments import fetch_fragments as _fetch_frags user = get_user_from_cookie(request) - auth_params = {"email": user.email} if user and user.email else {} + auth_params = {"email": user.email or user.username} if user else {} nav_params = {"app_name": "artdag", "path": path} try: diff --git a/l2/app/__init__.py b/l2/app/__init__.py index 1062a13..add533b 100644 --- a/l2/app/__init__.py +++ b/l2/app/__init__.py @@ -58,7 +58,7 @@ def create_app() -> FastAPI: from artdag_common.fragments import fetch_fragments as _fetch_frags user = get_user_from_cookie(request) - auth_params = {"email": user.email} if user and user.email else {} + auth_params = {"email": user.email or user.username} if user else {} nav_params = {"app_name": "artdag", "path": path} try: