4

I am using omniauth-linkedin-oauth2 (1.0.0) gem to login the users to our site using linkedin it was working fine until now not sure if its related to linkedin API changes or what

I am getting the below error

| (linkedin) Authentication failure! invalid_credentials: 
    OAuth2::Error, https_required: The client is not authorized
    {"error":"https_required","error_description":"The client is not authorized"}

Here's my configs:

  OmniAuth.config.logger = Rails.logger

  LINKEDIN_FIELDS =  ['id', 'first-name', 'last-name', 'picture-url', 'email-address', 'positions']

  Rails.application.config.middleware.use OmniAuth::Builder do

   provider :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET'], fields: LINKEDIN_FIELDS, secure_image_url: true

end

if Rails.env.development?
  OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
end

OmniAuth.config.on_failure = 
 Api::V2::UsersController.action(:linkedin_failure)
Mansoor Elahi
  • 941
  • 1
  • 9
  • 19
  • 1
    I am also facing the same error. Worked till yesterday, but not today. Please update if you get any solution. – Saravanan S Jun 19 '19 at 02:42
  • 1
    We're encountering the same issue, for what it's worth. We've raised a ticket with LinkedIn developer support. – Jason Jun 19 '19 at 02:53
  • 1
    I'm having the exact same issue, although I'm using a different JavaScript SDK, was working fine just couple hours ago, suddenly get error https_required now – Matthew Yang Jun 19 '19 at 03:05
  • 1
    Same issue here. All our calls are https. – crgt Jun 19 '19 at 04:29
  • apps like these are working they are using different strategy https://skrapp.io – Mansoor Elahi Jun 19 '19 at 04:34
  • 1
    Logged the issue here with detailed images: https://stackoverflow.com/questions/56660121/linkind-oauth-failed-with-https-required-error-message – Raghav Jun 19 '19 at 04:36

1 Answers1

0

It now started working again. I think linkedin fixed it from there end.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Mansoor Elahi
  • 941
  • 1
  • 9
  • 19