Fall back to username for auth-menu email param
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m11s

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 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-24 23:39:19 +00:00
parent 1b4e51c48c
commit a5717ec4d4
2 changed files with 2 additions and 2 deletions

View File

@@ -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:

View File

@@ -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: