Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Use appropriate social credentials

Adam Bogdal2b6cb6edcec5
diff --git a/saleor/registration/utils.py b/saleor/registration/utils.py
index bc734daed2..cd0deb8277 100644
--- a/saleor/registration/utils.py
+++ b/saleor/registration/utils.py
@@ -149,10 +149,10 @@ class GoogleClient(OAuth2Client):
'https://www.googleapis.com/auth/plus.me'])
def __init__(self, *args, **kwargs):
- super(GoogleClient, self).__init__(*args, **kwargs)
- if not self.client_id and self.client_secret:
+ if not self.client_id and not self.client_secret:
self.client_id = settings.GOOGLE_CLIENT_ID
self.client_secret = settings.GOOGLE_CLIENT_SECRET
+ super(GoogleClient, self).__init__(*args, **kwargs)
def get_user_info(self):
response = super(GoogleClient, self).get_user_info()
@@ -176,10 +176,10 @@ class FacebookClient(OAuth2Client):
scope = ','.join(['email'])
def __init__(self, *args, **kwargs):
- super(FacebookClient, self).__init__(*args, **kwargs)
- if not self.client_id and self.client_secret:
+ if not self.client_id and not self.client_secret:
self.client_id = settings.FACEBOOK_APP_ID
self.client_secret = settings.FACEBOOK_SECRET
+ super(FacebookClient, self).__init__(*args, **kwargs)
def get_user_info(self):
response = super(FacebookClient, self).get_user_info()