Skip to content

Commit

Permalink
fix: Logout
Browse files Browse the repository at this point in the history
  • Loading branch information
null2264 committed Jul 26, 2023
1 parent 549b659 commit 3ccd4ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nexus/core/routes/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ async def logout(request: Request):
request.session.clear()
resp = JSONResponse({"status": 200, "detail": "success"})
if request.cookies.get("loggedIn"):
resp.delete_cookie("loggedIn")
request.app.attachIsLoggedIn(resp)
else:
request.app.detachIsLoggedIn(resp)
return resp


Expand Down

0 comments on commit 3ccd4ee

Please sign in to comment.