LinkedIn OAuth2重定向网址不起作用

时间:2018-12-03 03:41:30

标签: django url oauth-2.0 callback linkedin

使用social-auth-app-django,我将设置设置如下:

INSTALLED_APPS = [
...
'social_django.middleware.SocialAuthExceptionMiddleware',
...]

TEMPLATES = [{
...
'OPTIONS': {
    'context_processors': [
     ...
'social_django.context_processors.backends',
'social_django.context_processors.login_redirect', 
....
}]

MIDDLEWARE_CLASSES = [ 
'social_django.middleware.SocialAuthExceptionMiddleware',
]

AUTHENTICATION_BACKENDS = (
'social_core.backends.linkedin.LinkedinOAuth2',
'django.contrib.auth.backends.ModelBackend',
)

回调/重定向网址是

http://localhost:8000/auth/linkedin/callback

如linkedIn开发人员所说,但它不起作用,也不安全。它必须安全吗?

0 个答案:

没有答案