0

I have deployed my django web application on my institute server using apache and mod_wsgi and I am using django-allauth google authentication. My institute network uses few proxy servers to interact with the Internet.

Google authentication works fine while I am running app on localhost, but as soon as I migrate the app to https_://fusion.*******.ac.in, google authentication shows following

Error image

callback uri: https_://fusion.*******.ac.in/accounts/google/login/callback/

Please help me with this problem.

Community
  • 1
  • 1
Saket Patel
  • 413
  • 3
  • 13
  • Did you add your production call back url , ie, ```https://fusion.xxxx.ac.in/login/redirect/``` in Google API credentials? – JPG Oct 06 '17 at 20:22
  • @JerinPeterGeorge, is it different from `https://fusion.xxxx.ac.in/accounts/google/login/callback/` ? – Saket Patel Oct 06 '17 at 20:25

1 Answers1

1

Add following lines in your wsgi file.

import os

http_proxy  = "host:port"
https_proxy = "host:port"
ftp_proxy   = "host:port"

proxyDict = { 
 "http"  : http_proxy, 
 "https" : https_proxy, 
 "ftp"   : ftp_proxy
}

os.environ["PROXIES"] = proxyDict
Sachin
  • 3,576
  • 1
  • 15
  • 24