I am trying to get a Linkedin access token from Omniauth using Devise, Omniauth and omniauth-linkedin-oauth-2 . Either with facebook and twitter I can get an access token, but when I try to associate it, I get the following error in the omniauth callback:
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, 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":"invalid_request"}
The linkedin app id and secret authentication work, since I get the omniauth callback, I donβt understand what the problem is.
Come up with the configuration below:
config.omniauth :linkedin, ENV['LINKEDIN_APP_ID'], ENV['LINKEDIN_APP_SECRET']
Any ideas on what could happen?
source share