SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed MAC

后端 未结 2 1383
忘了有多久
忘了有多久 2021-01-07 05:29

I\'m attempting to use the SoundCloud SDK for user authentication. My first route after a user clicks \"sign in\":

get \"/login\" do 
    client = Soundcloud         


        
相关标签:
2条回答
  • 2021-01-07 06:01
    1. Download http://curl.haxx.se/ca/ca-bundle.crt
    2. Copy certificate into /usr/local/etc/openssl/certs/
    3. Make omniauth.rb look like this:

      options = {
        scope: "email",
        :prompt => "select_account",
        access_type: 'offline',
        :client_options => {
          :ssl => {
            :ca_file => "/usr/local/etc/openssl/certs/ca-bundle.crt",
            :ca_path => "/usr/local/etc/openssl/certs"
          }
        }
      }
      
      Rails.application.config.middleware.use OmniAuth::Builder do
        provider :google_oauth2, Rails.application.secrets.client_id, Rails.application.secrets.client_secret, options
      end
      
    0 讨论(0)
  • 2021-01-07 06:21

    There is a gem to fix this issue, try adding gem 'certified', '~> 1.0'to your Gemfile.

    0 讨论(0)
提交回复
热议问题