diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd597dc44..2332ccfa2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,10 +52,6 @@ jobs: "y" # Admin password "admin" - # Facebook OAuth Client ID (default) - "" - # Facebook OAuth Secret (default) - "" # Google OAuth Client ID (default) "" # Google OAuth Secret (default) diff --git a/README.md b/README.md index 19c1dee71..64c4fb1aa 100644 --- a/README.md +++ b/README.md @@ -308,26 +308,6 @@ your browser. 'Client secret'. -### 3.2. Facebook OAuth - - 1. Go to https://developers.facebook.com/apps/ and create an app. - - 2. Add a Product 'Facebook Login' and select platform 'Web'. Enter 'Site URL' `https://{domain}/`. - - 3. Go to 'Facebook Login' / 'Settings' and add 'Valid OAuth Redirect URIs': - - https://{domain}/accounts/facebook/login/callback/ - https://{domain}/sk/accounts/facebook/login/callback/ - https://{domain}/en/accounts/facebook/login/callback/ - - Where `{domain}` is your production domain or `127.0.0.1:8000` if in local development mode. - 'Site URL' in form `127.0.0.1:8000` is invalid use `localhost:8000` instead. - - 5. Run the configuration script `setup.py` and enter given 'App ID' and 'App Secret'. - -To use Facebook Login on localhost, you need to use [https connection](#15-viewing-the-site-using-https). - - ## 4. Google custom search engine key 1. Sign into [Control Panel](https://cse.google.com/create/new) using your Google Account. diff --git a/chcemvediet/apps/accounts/migrations/0006_socialapp_remove_facebook.py b/chcemvediet/apps/accounts/migrations/0006_socialapp_remove_facebook.py new file mode 100644 index 000000000..95c59b3f2 --- /dev/null +++ b/chcemvediet/apps/accounts/migrations/0006_socialapp_remove_facebook.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +SITE_ID = 1 + +def forward(apps, schema_editor): + SocialApp = apps.get_model(u'socialaccount', u'SocialApp') + SocialAccount = apps.get_model(u'socialaccount', u'SocialAccount') + SocialApp.objects.filter(provider=u'facebook').delete() + SocialAccount.objects.filter(provider=u'facebook').delete() + +def backward(apps, schema_editor): + SocialApp = apps.get_model(u'socialaccount', u'SocialApp') + facebook = SocialApp.objects.create(provider=u'facebook', name=u'Facebook OAuth') + facebook.sites.add(SITE_ID) + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0005_socialapp_remove_twitter_and_linkedin'), + ('socialaccount', '0001_initial'), + ] + + operations = [ + migrations.RunPython(forward, backward), + ] diff --git a/chcemvediet/locale/sk/LC_MESSAGES/django.po b/chcemvediet/locale/sk/LC_MESSAGES/django.po index 6914b7e92..2715b2e1d 100644 --- a/chcemvediet/locale/sk/LC_MESSAGES/django.po +++ b/chcemvediet/locale/sk/LC_MESSAGES/django.po @@ -1317,9 +1317,6 @@ msgstr "Registrácia pozastavená" msgid "account:signup_closed:text" msgstr "Ospravedlňujeme sa, registrácia je momentálne pozastavená." -msgid "account:social_buttons:facebook" -msgstr "Prihlásiť pomocou Facebooku" - msgid "account:social_buttons:google" msgstr "Prihlásiť pomocou Googlu" diff --git a/chcemvediet/settings/common.py b/chcemvediet/settings/common.py index 83ccde074..b097dc46e 100644 --- a/chcemvediet/settings/common.py +++ b/chcemvediet/settings/common.py @@ -42,7 +42,6 @@ u'allauth', u'allauth.account', u'allauth.socialaccount', - u'allauth.socialaccount.providers.facebook', u'allauth.socialaccount.providers.google', # Other 3part apps u'adminplus', diff --git a/chcemvediet/templates/account/snippets/social_login_buttons.html b/chcemvediet/templates/account/snippets/social_login_buttons.html index 6e13a2ebd..08a6ef68b 100644 --- a/chcemvediet/templates/account/snippets/social_login_buttons.html +++ b/chcemvediet/templates/account/snippets/social_login_buttons.html @@ -11,13 +11,6 @@