From 16718806bad412c9585edc8233183634fd5d12c6 Mon Sep 17 00:00:00 2001 From: Son NK Date: Thu, 27 Feb 2020 22:57:37 +0700 Subject: [PATCH] fix --- app/auth/views/google.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/auth/views/google.py b/app/auth/views/google.py index 5639b1ec..96e4e53c 100644 --- a/app/auth/views/google.py +++ b/app/auth/views/google.py @@ -128,8 +128,8 @@ def google_callback(): # reset the next_url to avoid user getting redirected at each login :) session.pop("google_next_url", None) - if not SocialAuth.get_by(user_id=user.id, social="github"): - SocialAuth.create(user_id=user.id, social="github") + if not SocialAuth.get_by(user_id=user.id, social="google"): + SocialAuth.create(user_id=user.id, social="google") db.session.commit() return after_login(user, next_url)