Skip to content

Commit

Permalink
Fix: clear next in the session before triggering a login (#1129)
Browse files Browse the repository at this point in the history
* Fix: clear next in the session before triggering a login

* Format

Co-authored-by: Adrià Casajús <[email protected]>
  • Loading branch information
acasajus and acasajus authored Jun 30, 2022
1 parent 21feced commit 8b89a42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/auth/views/proton.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def proton_login():
next_url = sanitize_next_url(request.args.get("next"))
if next_url:
session["oauth_next"] = next_url
elif "oauth_next" in session:
del session["oauth_next"]
proton = OAuth2Session(PROTON_CLIENT_ID, redirect_uri=_redirect_uri)
authorization_url, state = proton.authorization_url(_authorization_base_url)

Expand Down

0 comments on commit 8b89a42

Please sign in to comment.