title: django-social-auth redirect_uri invalid
body: <p>I've been banging my head against the wall trying to get django-social-auth working. My dev server is a server in a private network at my work, accessed by a 10.0.0.* IP Address. We have multiple django apps running on this server. Here's the config I have for this app:</p>
  
  <pre><code># Perceptual
  location /perceptual/static/ {
          alias /opt/perceptual/perceptual/static/;
  }
  location /perceptual/ {
          proxy_pass http://127.0.0.1:8001;
  }
  </code></pre>
  
  <p>I'm running a backbone.js app out of my static directory with this. So, I can go to 10.0.0.54/perceptual/static/, and get my backbone app.  </p>
  
  <p><strong>NOW,</strong> I have my Facebook APP_ID and FACEBOOK_API_SECRET in my settings file, all correctly configured. I also have a line in my /etc/hosts file on my <em>actual</em> machine (not the dev server) that directs <strong>myapp.com</strong> to <strong>10.0.0.54</strong>, and my Facebook app config for the App Domains and Site URL look like this:</p>
  
  <pre><code>App Domains: perceptual.com
  Site URL: http://perceptual.com
  </code></pre>
  
  <p>The problem is, whenever I go to perceptual.com/perceptual/static/login/facebook/ it gives me this error:
  <img src="https://i.stack.imgur.com/ZFDSi.png" alt="Facebook Error (django-social-auth)"></p>
  
  <p>Here's what my URL looks like when I get that error:
  <a href="https://www.facebook.com/dialog/oauth?scope=email&amp;state=PC0OhXnEuaW2wcUuINO0rMSMAtVDuMbn&amp;redirect_uri=http%3A%2F%2F127.0.0.1%3A8001%2Fperceptual%2Fcomplete%2Ffacebook%2F%3Fredirect_state%3DPC0OhXnEuaW2wcUuINO0rMSMAtVDuMbn&amp;client_id=419178148154217" rel="noreferrer">https://www.facebook.com/dialog/oauth?scope=email&amp;state=PC0OhXnEuaW2wcUuINO0rMSMAtVDuMbn&amp;redirect_uri=http%3A%2F%2F127.0.0.1%3A8001%2Fperceptual%2Fcomplete%2Ffacebook%2F%3Fredirect_state%3DPC0OhXnEuaW2wcUuINO0rMSMAtVDuMbn&amp;client_id=419178148154217</a></p>
  
  <p>So you can see from the URL that my redirect_uri is <code>http://localhost:8001</code> - But I don't want it to be that, obviously. As soon as I change it to perceptual.com, it gets a bit farther: Then I get this error:</p>
  
  <pre><code>AuthFailed at /perceptual/complete/facebook/
  Authentication failed: There was an error authenticating the app
  </code></pre>
  
  <p>Here's my <a href="http://pastebin.com/UVE6Eqft" rel="noreferrer">traceback, if it helps</a></p>
  
  <p>At this point, I'm stuck - How do I get my server to change the redirect_uri to something that Facebook can handle, instead of 127.0.0.1:8000? My guess is that it's coming from Django, but I'm not sure how to change it. Then, once that's fixed, it still can't fully authenticate, and gets the error stated above. Any help would be greatly appreciated. Thanks so much!</p>