Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Remove logout route
Browse files Browse the repository at this point in the history
  • Loading branch information
msathieu committed Mar 13, 2024
1 parent ebc2e7f commit 800f3c8
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions backend/routes/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,3 @@ def login(
if user:
return Response(content=create_token(user))
return Response(status_code=401, content="Invalid Ticket!")


@login_router.get("/logout")
def logout() -> Response:
"""
This function will log a user out, by removing the session from storage
:return: A confirmation that the logout was successful, and it tells the browser to remove the cookie.
"""
response: Response = Response(content="You've been successfully logged out")
response.set_cookie("token", "")
return response

0 comments on commit 800f3c8

Please sign in to comment.