-
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
Error when try to get access from facebook backend #5
Comments
This is because python social auth couldn't find the backend.
|
@PhilipGarnero yes i did it but nothing work |
Can you show me your settings ? |
@PhilipGarnero You can see my settings bellow """ DEBUG = True #TEMPLATE_DEBUG = True ALLOWED_HOSTS = ['*'] #Application definition INSTALLED_APPS = (
) MIDDLEWARE_CLASSES = (
) WSGI_APPLICATION = 'flirt.wsgi.application' AUTHENTICATION_BACKENDS = (
) TEMPLATE_CONTEXT_PROCESSORS = (
) SOCIAL_AUTH_ADMIN_USER_SEARCH_FIELDS = [ 'username', 'first_name'] SOCIAL_AUTH_FACEBOOK_KEY = '1444690159152044' SOCIAL_AUTH_FACEBOOK_SCOPE = ['email'] #rest api LOGIN_REDIRECT_URL = '/users/' OAUTH2_PROVIDER = {
} REST_FRAMEWORK = {
} |
I don't see any problem with your configuration... |
@PhilipGarnero I've already done it and i get for token: b'user_access_token' Notice that when i run this command: |
In django shell try this and see if it returns the facebook backend:
|
@PhilipGarnero yes i tried it and it returns the facebook backend |
Try this now
|
@PhilipGarnero i tried it and it return |
I really have no clue then ... Everything seems to be ok. |
Ok, thank for consecrated me your precious time @PhilipGarnero . I continue to search a way for solve this issue |
@gelog93 I was thinking, if your project is not private and doesn't contain sensitive data, you can send it to me and I'll try to figure out what is going on exactly. |
@PhilipGarnero Sorry for late. I've created minimal project and run curl command on but i get the same error so i've created new repository where i've put this project. You can find it at https://github.com/gelog93/auth/archive/master.zip please download it. i'm so hopeless |
@gelog93 I tried your setup with a virtualenv and just ran pip install django-rest-framework-social-oauth2 to install everything. I also replaced your postgre db to sqlite and replaced your facebook app id and secret and everything worked as expected. |
@PhilipGarnero what's python version do you use ? |
I'm using python2.7.3 |
@PhilipGarnero maybe python version is the problem because i use python 3.4 |
@PhilipGarnero please can you test the app with my fb app id an secret ? with follow token ?
|
I managed to reproduce the error with python 3.4. I suspect a wrong string encoding. |
@PhilipGarnero Finally we know the cause |
catch HttpError to display it and prevent 500 resolve issue #5
@gelog93 this should be fixed now. |
Yes it work like a charm i'm so happy. Thank a lot @PhilipGarnero you are a good guy. Hope many people will use your good library |
Was really helpful for finding |
The backend names are the same one used by python social auth. |
Hello
first of all thank @PhilipGarnero for your great library. I read about and i love it but i get this error:
{"detail":"Invalid token header. Invalid backend" } when i run follow command:
curl -H "Authorization: Bearer facebook user_access_token" http://localhost:8000/auth/convert-token
Please help me i try to solve this error since 3 days but i fail. please i need your help @PhilipGarnero
The text was updated successfully, but these errors were encountered: