From 340d0bcb9a8668b07b80493f2da674b2581196f8 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sat, 5 Jun 2021 18:52:42 +0530 Subject: added check for signing in with google --- app/views/auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app') 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: -- cgit v1.2.3