-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug when configuring OAuth #141
Comments
Thanks for filing such a detailed ticket. Are you using a new connection for each thread or trying to share a connection between threads? Can you give more context into the kinds of requests you are making and maybe an example of the threaded code? |
I'm using a new connection per thread. I can't even make a request, because faraday throws the error above when I write the code I wrote above |
It seems the bug is that Faraday has resolved to a newer version in the Gemspec and that version included breaking changes. The specs are currently broken on master. Will open PR soon. Thanks for reporting, this does not appear to be related to any thread safety concerns. Until the fix is up, you can either point faraday down a few minor versions (I will update gemspec to fix future issue) or you can apply a patch to that line, for testing I changed it to: ssl_options = config.ssl || {} I see no problem opening up the ssl_options on the oauth api side of things. |
This should be fixed in master. |
awesome, I wrote my own wrapper for now, but will move back to this when you guys release |
I feel like the thread safe methods weren't tested very well with OAuth.
Im getting this error:
Which is obviously being caused by this line:
https://github.com/bigcommerce/bigcommerce-api-ruby/blob/v1.0.0/lib/bigcommerce/connection.rb#L10
Because the ssl_options are being set to nil and its trying to iterate over the keys.
I ran the Faraday method manually and set the
ssl_options
to an empty hash{}
instead of anil
and it worked first time. Surely others are experiencing this issue?my code:
The text was updated successfully, but these errors were encountered: