Linkedin OAuth2 APIとの統合を担当するpython-social-authでdjangoアプリケーションを使用しています。
Linkedin は 500 サーバー エラーを返します。
{
"error":"server_error",
"error_description":"the authorization server encountered an unexpected condition : Unable to retrieve access token"
}
再現する手順:
- OAuth 2.0 リダイレクト URL を設定して新しい LinkedIn アプリを作成する
http://localhost/complete/linkedin-oauth2/? python-social-auth モジュールを使用して django アプリをセットアップします。
SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY = <API key> SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET = <Secret Key>ポート 80 で Django サーバーを実行し、次の場所に移動します。
http://localhost/login/linkedin-oauth2/- Linkedin Settingsに移動し、 Groups, Companies & Applications > View your applicationsを選択し、アプリケーション名を選択して送信します削除
- Django アプリからユーザーをログアウトし、認証を再度開始します。
http://localhost/login/linkedin-oauth2/