Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It keeps redirecting to http #1994

Closed
slimaidarismail opened this issue Apr 1, 2018 · 3 comments
Closed

It keeps redirecting to http #1994

slimaidarismail opened this issue Apr 1, 2018 · 3 comments

Comments

@slimaidarismail
Copy link

I made a Django app, install allauth and configured it.
SOCIALACCOUNT_PROVIDERS = { 'facebook': { 'METHOD': 'oauth2', 'SCOPE': ['email', 'public_profile'], 'AUTH_PARAMS': {'auth_type': 'reauthenticate'}, 'INIT_PARAMS': {'cookie': True}, 'FIELDS': [ 'id', 'email', 'name', 'first_name', 'last_name', 'verified', 'locale', 'timezone', 'link', 'gender', 'updated_time', ], 'EXCHANGE_TOKEN': True, 'VERIFIED_EMAIL': False, 'VERSION': 'v2.2', } }
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'social_django', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.facebook', ]
index.html :
{% load socialaccount %} <a href="{% provider_login_url "facebook" method="oauth2" %}">Facebook OAuth2</a>
The problem with Fcaebook :
I want the redirect uri to start with HTTPS not HTTP (redirect_uri=http%3A%2)
because it giving me this error :
Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://

Any suggestion pls?

@pennersr
Copy link
Owner

pennersr commented May 9, 2018

Try ACCOUNT_DEFAULT_HTTP_PROTOCOL='https' in your settings. In any case, closing this -- this is a deployment issue, not an issue in allauth.

@pennersr pennersr closed this as completed May 9, 2018
@mjarpitanand
Copy link

Try ACCOUNT_DEFAULT_HTTP_PROTOCOL='https' in your settings, this solution works.THanks

@edijs
Copy link

edijs commented Feb 23, 2019

+1
ACCOUNT_DEFAULT_HTTP_PROTOCOL='https' solved this problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants