aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-05 18:52:42 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-05 18:52:42 +0530
commit340d0bcb9a8668b07b80493f2da674b2581196f8 (patch)
tree1e5823c87a5e1697a92aa9c7f5d0ed915464e3b9
parent167befc8ed6fd8e327b4554f6716bbc1d7f3531b (diff)
added check for signing in with google
-rw-r--r--app/views/auth.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/auth.py b/app/views/auth.py
index 487ae9b..3d798f7 100644
--- a/app/views/auth.py
+++ b/app/views/auth.py
@@ -37,7 +37,9 @@ def signin_user():
if form.validate_on_submit():
user = models.User.query.filter_by(email=form.email.data).first()
if user is not None:
- if user.check_password(form.password.data):
+ if user.login_type != "Normie":
+ flash("Please Use Sign in With {}".format(user.login_type.title()))
+ elif user.check_password(form.password.data):
flask_login.login_user(user)
return redirect(url_for("user_dashboard"))
else: