Fix logout: redirect to blog home to avoid re-auth loop

Account's / requires login, so redirecting there after logout
triggers silent OAuth re-authentication. Blog home is safe.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-23 11:15:14 +00:00
parent 8323c45711
commit d0a5170cd9

View File

@@ -125,6 +125,8 @@ def create_oauth_blueprint(app_name: str) -> Blueprint:
async def logout():
qsession.pop(SESSION_USER_KEY, None)
qsession.pop("cart_sid", None)
return redirect("/")
# Redirect to blog home — avoids re-auth loop on apps that require login
from shared.infrastructure.urls import blog_url
return redirect(blog_url("/"))
return bp