-
Notifications
You must be signed in to change notification settings - Fork 190
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
Facebook authorization works locally but not on production: "Authentication credentials were not provided." #8
Comments
Ok, I have no idea what's going on, but... I tried the same SQLite DB that I use for local development on the online server. Basically I made two copies of my local database. Names them online.dev.db and online.prod.db. Configured corresponding settings to use two different files. Then I ran ./manage.py runserver ON the online server itself from SSH, so basically running dev server online. Then from Python running locally I just did:
So this uses the dev DB. Same request to "http://our-server-online.com/api/convert-token/" returns:
On literally the same database... Am I going crazy? |
Ok, if I'm using the online version of the Django app with a totally clean database which has just been created, synced and superuser created (no Provider Application added yet), requesting the convert-token url with a valid access token responds with the same:
...as if there is nothing coming to the server from Curl. |
Ok, looks like it was the Apache2 not accepting Authorization header. For some reason. This helped http://stackoverflow.com/questions/18424055/authorization-header-and-apache-request-headers-function
|
Well, glad you figured it out by yourself ! 👍 |
Hello. I'm testing the same Django application locally and on production server and it fails to work for the production environment.
This is the pip list for both servers:
The Django application code comes from GIT and dev/prod environment is separated by using different settings files. The difference between dev.py and production.py is currently minimal and basically just controlling the DB settings and ALLOWED_HOSTS.
The Oauth2 provider Application in both cases set to the same name and permissions. The request that I'm doing to localhost/api/convert-token and onlineserver/api/convert token is this:
Doing it to a local server responses with:
Doing it the online one:
The Facebook application is configured to use the domain name that is online, I thought that may be a problem, looks like it's not.
Am I missing something?
The text was updated successfully, but these errors were encountered: