diff --git a/infrastructure/oauth.py b/infrastructure/oauth.py index 6c5dd83..a1cb3a5 100644 --- a/infrastructure/oauth.py +++ b/infrastructure/oauth.py @@ -120,6 +120,16 @@ def create_oauth_blueprint(app_name: str) -> Blueprint: return redirect(next_url, 303) + @bp.get("/clear") + @bp.get("/clear/") + async def clear(): + """One-time migration helper: clear all session cookies.""" + qsession.clear() + resp = redirect("/") + resp.delete_cookie("blog_session", domain=".rose-ash.com", path="/") + resp.delete_cookie("sso_hint", domain=".rose-ash.com", path="/") + return resp + @bp.post("/logout") @bp.post("/logout/") async def logout():