我正试图通过Omniauth使用Devise,Omniauth和
omniauth-linkedin-oauth-2来获取Linkedin访问令牌.无论是使用facebook还是twitter,我都可以获得访问令牌,但是当我尝试使用linkedin时,我会收到以下错误omniauth回调:
ERROR -- omniauth: (linkedin) Authentication failure! invalid_credentials: OAuth2::Error,invalid_request: missing required parameters,includes an invalid parameter value,parameter more than once. : Unable to retrieve access token : appId or redirect uri does not match authorization code or authorization code expired {"error_description":"missing required parameters,parameter more than once. : Unable to retrieve access token : appId or redirect uri does not match authorization code or authorization code expired","error":"invalid_request"}
linkedin应用程序ID和秘密身份验证正在工作,因为我在omniauth上收到回调,事情是我无法意识到问题在这里.
下面的设计配置:
config.omniauth :linkedin,ENV['LINKEDIN_APP_ID'],ENV['LINKEDIN_APP_SECRET']
关于可能发生什么的任何想法?