Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Drop default facebook integration
Artur Smęt41d6ad093bae
diff --git a/docs/integrations.rst b/docs/integrations.rstindex cf0f84ff95..dd63ea0424 100644--- a/docs/integrations.rst+++ b/docs/integrations.rst@@ -53,42 +53,11 @@ To update the exchange rates run the following command at least once per day:Heroku users can use the `Scheduler add-on <https://elements.heroku.com/addons/scheduler>`_ to automatically call the command daily at a predefined time.-Log in using Facebook----------------------+Log in using Social Media+--------------------------This integration will let your customers log in using their Facebook accounts.--Before you begin you will need a verified Facebook account.-Start by `registering as a developer <https://developers.facebook.com/>`_ on Facebook and creating a new Facebook app for your store.--You can find your freshly created app's “App ID” and “App Secret” in its *Settings* tab.--Export the following environment variables:--``FACEBOOK_APP_ID``- Your Facebook app's “App ID.”--``FACEBOOK_SECRET``- Your Facebook app's “App Secret.”---Log in using Google----------------------This integration will let your customers log in using their Google accounts.--Before you begin you will need a Google account.-Start by `creating a Google Developers Console project and client ID <https://developers.google.com/identity/sign-in/web/devconsole-project>`_.--Set the “Redirect URI” to ``http://<yourserver>/account/oauth_callback/google/`` where ``<yourserver>`` is the domain that you use.--Obtained “Client ID” and “Client secret“ need to be exported as environment variables:--``GOOGLE_CLIENT_ID``- Your project's “Client ID.”--``GOOGLE_CLIENT_SECRET``- Your project's “Client secret.“+Saleor uses `django-allauth <https://github.com/pennersr/django-allauth>`_ to provide integration between registration mechanism and Social Media accounts.+To enable particular social media integration, please refer to django-allauth documentation.Reporting with Google Analyticsdiff --git a/saleor/core/context_processors.py b/saleor/core/context_processors.pyindex 1817656264..6431659fe2 100644--- a/saleor/core/context_processors.py+++ b/saleor/core/context_processors.py@@ -25,7 +25,3 @@ def categories(request):def search_enabled(request):return {'SEARCH_IS_ENABLED': bool(settings.SEARCH_BACKENDS)}---def social_account_providers(request):- return get_setting_as_dict('SOCIALACCOUNT_PROVIDERS')diff --git a/saleor/settings.py b/saleor/settings.pyindex 69035d5d7f..e31ea07046 100644--- a/saleor/settings.py+++ b/saleor/settings.py@@ -92,7 +92,6 @@ context_processors = ['saleor.core.context_processors.categories','saleor.cart.context_processors.cart_counter','saleor.core.context_processors.search_enabled',- 'saleor.core.context_processors.social_account_providers',]loaders = [@@ -176,7 +175,6 @@ INSTALLED_APPS = ['allauth','allauth.account','allauth.socialaccount',- 'allauth.socialaccount.providers.facebook',]LOGGING = {@@ -241,12 +239,7 @@ ACCOUNT_ACTIVATION_DAYS = 3LOGIN_REDIRECT_URL = 'home'-FACEBOOK_APP_ID = os.environ.get('FACEBOOK_APP_ID')-FACEBOOK_SECRET = os.environ.get('FACEBOOK_SECRET')-GOOGLE_ANALYTICS_TRACKING_ID = os.environ.get('GOOGLE_ANALYTICS_TRACKING_ID')-GOOGLE_CLIENT_ID = os.environ.get('GOOGLE_CLIENT_ID')-GOOGLE_CLIENT_SECRET = os.environ.get('GOOGLE_CLIENT_SECRET')PAYMENT_MODEL = 'order.Payment'@@ -330,12 +323,6 @@ ACCOUNT_LOGOUT_ON_GET = TrueACCOUNT_SESSION_REMEMBER = FalseACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = FalseACCOUNT_ADAPTER = 'saleor.userprofile.adapters.AccountAdapter'-SOCIALACCOUNT_PROVIDERS = {- 'facebook': {- 'SCOPE': ['email'],- 'METHOD': 'oauth2'- }-}ELASTICSEARCH_URL = os.environ.get('ELASTICSEARCH_URL')diff --git a/templates/account/login.html b/templates/account/login.htmlindex 86d0be068f..bf1cfb916b 100644--- a/templates/account/login.html+++ b/templates/account/login.html@@ -1,7 +1,6 @@{% extends "base.html" %}{% load bootstrap_form from bootstrap3 %}{% load staticfiles %}-{% load account socialaccount %}{% load i18n %}{% block title %}{% trans "Log in" %} — {{ block.super }}{% endblock %}@@ -28,21 +27,6 @@<a href="{% url 'account_reset_password' %}">{% trans "Forgot password?" %}</a></div></div>- {% if SOCIALACCOUNT_PROVIDERS %}- {% include "socialaccount/snippets/login_extra.html" %}-- <p>{% trans "Want to use your social profile?" %}</p>- <p>- {% if "facebook" in SOCIALACCOUNT_PROVIDERS %}- <a class="btn btn-default" href="{% provider_login_url "facebook" method="oauth2" %}">- {% trans "Log in using Facebook" %}- </a>- {% endif %}- {% if 'google' in SOCIALACCOUNT_PROVIDERS %}- <a class="btn btn-default" href="{% provider_login_url "google" %}"> {% trans "Log in using Google" %}</a>- {% endif %}- </p>- {% endif %}</form></div><div class="col-md-6">diff --git a/templates/checkout/login.html b/templates/checkout/login.htmlindex d69001fd9f..845693e96c 100644--- a/templates/checkout/login.html+++ b/templates/checkout/login.html@@ -1,7 +1,6 @@{% extends "base.html" %}{% load bootstrap_form from bootstrap3 %}{% load staticfiles %}-{% load account socialaccount %}{% load i18n %}{% block title %}{% trans "Login" %} — {{ block.super }}{% endblock %}@@ -26,20 +25,6 @@<a href="{% url 'account_reset_password' %}">{% trans "Forgot password?" %}</a></div></div>- {% get_providers as socialaccount_providers %}- {% if socialaccount_providers %}- <p>{% trans "Want to use your social profile?" %}</p>- <p>- {% if facebook_login_url %}- <a class="btn btn-default" href="{% provider_login_url "facebook" method="oauth2" %}">- {% trans "Log in using Facebook" %}- </a>- {% endif %}- {% if google_login_url %}- <a class="btn btn-default" href="{% provider_login_url "google" %}"> {% trans "Log in using Google" %}</a>- {% endif %}- </p>- {% endif %}</form></div><div class="col-md-6">@@ -54,4 +39,4 @@</div></div>-{% endblock %}\ No newline at end of file+{% endblock %}