简体   繁体   English

找不到用于linkedin oauth2的python-social-auth后端

[英]python-social-auth backend not found for linkedin oauth2

I am trying to incorporate linkedin oauth2 in my app using python-social-auth. 我正在尝试使用python-social-auth在我的应用程序中合并linkedin oauth2。 However, when i navigate to 127.0.0.1:8000/login/linkedin/ in Chrome I get a "Backend not found" error. 但是,当我在Chrome中导航到127.0.0.1:8000/login/linkedin/时,我收到“未找到后端”错误。 Specifically, the logs display the following errors: 具体来说,日志显示以下错误:

[08/Sep/2014 16:44:38] "GET /login/linkedin HTTP/1.1" 301 0
[08/Sep/2014 16:44:38] "GET /login/linkedin/ HTTP/1.1" 404 1608

I have the following related code in my settings.py: 我在settings.py中有以下相关代码:

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'github_app',
    'tech_seeker',
    'social.apps.django_app.default'
)

SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY = "<MY_KEY_HERE>"
SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET = "<MY_SECRET_HERE>"

SOCIAL_AUTH_STRATEGY = 'social.strategies.django_strategy.DjangoStrategy'

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

SOCIAL_AUTH_PIPELINE = (
    'social.pipeline.social_auth.social_details',
    'social.pipeline.social_auth.social_uid',
    'social.pipeline.social_auth.auth_allowed',
    'github_app.auth_pipeline.user'
)

Any help is appreciated. 任何帮助表示赞赏。

因为您使用OAUTH2,所以您需要更改使用oauth2的URL。

<a href="{% url 'social:begin' backend='linkedin-oauth2' %}">LinkedIn</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Linkedin上使用python-social-auth - Using python-social-auth with linkedin 使用python-social-auth向Linkedin进行身份验证 - Authenticating with Linkedin using python-social-auth 在Google App Engine上使用python-social-auth进行的Google OAuth2身份验证失败 - Google OAuth2 authentication using python-social-auth on Google App Engine failed HTTPError 403(Forbidden),Django和python-social-auth通过OAuth2连接到Google - HTTPError 403 (Forbidden) with Django and python-social-auth connecting to Google with OAuth2 python-social-auth Facebook和LinkedIn用户的电子邮件为空 - python-social-auth Facebook and LinkedIn user's email is empty 如何从python-social-auth获取后端实例 - How to get backend instance from python-social-auth 使用Django和Steam后端实现python-social-auth的正确方法 - Proper way to implement python-social-auth with Django and Steam backend python-social-auth中的用户名 - Username in python-social-auth 在没有社交后端的情况下在Python-Social-Auth上注册新用户的最佳方法是什么? - What's the best way to register a new user on Python-Social-Auth without a social backend? Django / python-social-auth:LinkedIn额外数据在某些字段上返回null - Django/ python-social-auth: LinkedIn extra data returns null on some fields
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM