Add /auth/clear endpoint to reset session cookies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -120,6 +120,16 @@ def create_oauth_blueprint(app_name: str) -> Blueprint:
|
|||||||
|
|
||||||
return redirect(next_url, 303)
|
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")
|
||||||
@bp.post("/logout/")
|
@bp.post("/logout/")
|
||||||
async def logout():
|
async def logout():
|
||||||
|
|||||||
Reference in New Issue
Block a user