aboutsummaryrefslogtreecommitdiff
path: root/app/views/githublogin.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/githublogin.py')
-rw-r--r--app/views/githublogin.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/githublogin.py b/app/views/githublogin.py
index 7320163..defdad1 100644
--- a/app/views/githublogin.py
+++ b/app/views/githublogin.py
@@ -64,7 +64,10 @@ def github_authorized(oauth_token):
flash("Unable to find an account for that Github user", "error")
return redirect(url_for("user_claim_page"))
elif loginUser(userByGithub):
- return redirect(next_url or url_for("home_page"))
+ if current_user.password is None:
+ return redirect(next_url or url_for("set_password_page", optional=True))
+ else:
+ return redirect(next_url or url_for("home_page"))
else:
flash("Authorization failed [err=gh-login-failed]", "danger")
return redirect(url_for("user.login"))