show error if no such email exists from Github
This commit is contained in:
parent
90dc05725a
commit
cb3ea63066
|
@ -78,7 +78,12 @@ def github_callback():
|
||||||
break
|
break
|
||||||
|
|
||||||
if not email:
|
if not email:
|
||||||
raise Exception("cannot get email for github user")
|
LOG.error(f"cannot get email for github user {github_user_data} {emails}")
|
||||||
|
flash(
|
||||||
|
"Cannot get a valid email from Github, please another way to login/sign up",
|
||||||
|
"error",
|
||||||
|
)
|
||||||
|
return redirect(url_for("auth.login"))
|
||||||
|
|
||||||
email = email.lower()
|
email = email.lower()
|
||||||
user = User.get_by(email=email)
|
user = User.get_by(email=email)
|
||||||
|
|
Loading…
Reference in a new issue