-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
convert-token return access_denied in facebook backend #185
Comments
You need to include more details about your configuration and also the exception stacktrace. |
I have some details, I did the normal configuration, change the host and create an application in the admin. settings.pyDJANGO_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django.forms",
]
THIRD_PARTY_APPS = [
"rest_framework",
"captcha",
"debug_toolbar",
"oauth2_provider",
"social_django",
"drf_social_oauth2",
]
LOCAL_APPS = [
"base.apps.BaseConfig",
]
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [BASE_DIR / "templates"],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
# context auth
"social_django.context_processors.backends",
"social_django.context_processors.login_redirect",
# custom context
],
},
},
]
REST_FRAMEWORK = {
"DEFAULT_PERMISSION_CLASSES": (),
"DEFAULT_AUTHENTICATION_CLASSES": (
# 'oauth2_provider.ext.rest_framework.OAuth2Authentication', # django-oauth-toolkit < 1.0.0
"oauth2_provider.contrib.rest_framework.OAuth2Authentication", # django-oauth-toolkit >= 1.0.0
"drf_social_oauth2.authentication.SocialAuthentication",
),
}
AUTHENTICATION_BACKENDS = (
# Facebook OAuth2
"social_core.backends.facebook.FacebookAppOAuth2",
"social_core.backends.facebook.FacebookOAuth2",
# drf_social_oauth2
"drf_social_oauth2.backends.DjangoOAuth2",
# Django
"django.contrib.auth.backends.ModelBackend",
)
# Facebook configuration
SOCIAL_AUTH_FACEBOOK_KEY = "13xxxxxxxx"
SOCIAL_AUTH_FACEBOOK_SECRET = "e5exxxxxxxxxxxxxxxxxxxxxx"
SOCIAL_AUTH_FACEBOOK_SCOPE = ["email"]
SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = {"fields": "id, name, email"} facebook apprequirements.txt
host
exception
|
hey @wagnerdelima did figure out how to solve this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I went through the process in the guide and when I try keys it gives me an error.
I've researched in the documentation but can't find a clear answer.
Could there be an internal error?
The text was updated successfully, but these errors were encountered: