I am able to setup django-allauth with social login using this tutorial.
However I need running all my website in https.
Can django-allauth be successfully and reliably used with django-sslify?
The web server you're hosting Django in handles SSL. If you put Nginx or Apache in front, for example, they will do all the SSL work. Django won't have any concept of being HTTP vs HTTPS.
The django-sslify module doesn't make a site run in SSL, it just redirects any detected non-SSL request to the equivalent SSL URL.
For django-allauth to work with SSL, all you need to do is ensure the configuration of redirect URLs is set to https://... etc.
Related
I am trying to use facebook sdk for facebook login.
I gave http://localhost as Valid OAuth Redirect URIs but it throws the following error
HTTPS is required for all Redirect URIs.
I used this future few days ago it worked fine. but now it throws this error
And I am not able to disable
Enforce HTTPS
option
I ran into this issue with my Rails app that I usually run with http://localhost:3000.
To use https, I used ngrok which allows you to use https by providing a tunnel. To do this:
I went to their website and downloaded their program
I extracted the file for the program
In my console, I went into the directory where ngrok was extracted to and entered 'grok http 3000' on my Windows machine, others may use './grok http 3000'
After entering that, ngrok provided a https address which I put into the Valid OAuth Redirect URIs field in Facebook
Then I started my server and was able to access it using that https address instead of localhost:3000
yep, they changed that recently :-(
For testing the login flow locally I installed a self-signed certificate
https://letsencrypt.org/docs/certificates-for-localhost/
btw, I doesn't have to be trusted by the browser if you're OK with a one time security warning.
Don't use this certificate in production!
We’ve bind our DNN site to http (80) URL.
URL has AWS SSL certificate.
Problem is when we navigate page to page https change into http.
(But all pages can be access by https://.....)
We tried IIS redirect binding. – Not worked.
(Pages are redirecting to endless loop)
Then we tried redirect using web config. – Not worked.
(500 server error occurred)
Anyone has idea to how to fix this issue.
You need to enable SSL in the Portal Settings.
Admin > Site Settings > Advanced Settings > SSL Settings
There you need to set "SSL Enabled?" to true.
After open server, web only run without "http" url
like this127.0.0.1:8000/blog/
and add http with 404 ERROR,where I did wrong?
For now you are developing the Django not deploying it on the server. The http or https will be set with the server configuration file. It don't work now. Simply develop your site and figure this out when you are deploying the app
If I try to login using google provider, I get redirected to
http://127.0.0.1:8001/accounts/google/login/callback/...
whereas I should be redirected to
http://example.com/accounts/google/login/callback/...
How can I fix that?
Update:
According to my server configuration 127.0.0.1:8001 is where the gunicorn_django runs and the port 80 is handled by nginx.
Most probably this is the URL configured in your google app. Check Google Developers Console and make sure that your callback URL is correct..
I have implemented loadbalancing for my django website. My loadbalancing server is https but my individual servers are http. I have set SESSION_COOKIE_SECURE to True in my individual servers settings.py file.
If I hit the server directly with loadbalancer, Cookie is secured and working fine (Because the loadbalancing server is https secured).
But if I hit individual servers the page is redirected to the login page and the user won't be able to login (Because individual servers are not secured).
As per the django doc, I have included SECURE_PROXY_SSL_HEADER in settings.py but it supports only django 1.4 version. I'm using Django 1.3 for my website.
I need to secure cookie for my loadbalancing server and the realips (individual servers)
Any solution in Django 1.3 ?
Thanks in advance