I’m really new to Smartthings and Ruby so please be patient if this is a dumb question!
Okay, so I’m trying my hand at a Web Service interface. I’ve been going through the tutorial and hit a snag in the /oauth/callback
The callback receives a code but then seems to fail on the client.auth_code.get_token call.
hanlde requests to /oauth/callback URL.
get ‘/oauth/callback’ do
code = params[:code]
Use the code to get the token.
response = client.auth_code.get_token(code, redirect_uri: redirect_uri, scope: ‘app’)
now that we have the access token, we will store it in the session
session[:access_token] = response.token
debug - inspect the running console for the
expires in (seconds from now), and the expires at (in epoch time)
puts 'TOKEN EXPIRES IN ’ + response.expires_in.to_s
puts 'TOKEN EXPIRES AT ’ + response.expires_at.to_s
I receive the error: Faraday::SSLError at /oauth/callback SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
I assume the error must have something to do with an SSL setting on my machine (Windows 10) but I’m at a loss as to how to work around it. Thanks for any help!