fix user getting redirected at each google login

This commit is contained in:
Son NK 2019-07-08 23:27:00 +02:00 committed by Son NK
parent 7ea4c157a1
commit bdc22f3c68
1 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,10 @@ def google_callback():
if "google_next_url" in session:
next_url = session["google_next_url"]
LOG.debug("redirect user to %s", next_url)
# reset the next_url to avoid user getting redirected at each login :)
session.pop("google_next_url", None)
return redirect(next_url)
else:
LOG.debug("redirect user to dashboard")