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:
@@ -125,6 +125,8 @@ def create_oauth_blueprint(app_name: str) -> Blueprint:
|
|||||||
async def logout():
|
async def logout():
|
||||||
qsession.pop(SESSION_USER_KEY, None)
|
qsession.pop(SESSION_USER_KEY, None)
|
||||||
qsession.pop("cart_sid", 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
|
return bp
|
||||||
|
|||||||
Reference in New Issue
Block a user