Shopify/omniauth-shopify-oauth2

Cannot rescue OmniAuth::Strategies::OAuth2::CallbackError exception

maxrice opened this issue · 3 comments

What's the proper way to rescue the CallbackError raised here? We're seeing a lot of OmniAuth::Strategies::OAuth2::CallbackError errors in our Airbrake logs, as it seems the failure endpoint is not being invoked when CallBackError is raised. We've resorted to doing some client-side validation of the customer's myshopify domain prior to redirection, but would love to make use of the failure endpoint if possible.

Here's an abbreviated backtrace from our app:

[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/omniauth-shopify-oauth2-1.1.2/lib/omniauth/strategies/shopify.rb:27:in setup_phase
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:195:in request_call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:181:in call!
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:164:in call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/builder.rb:49:in call
...

bump, any ideas with this?

Hi @maxrice, thanks for your patience with this! We just rolled out a new release (1.1.3) that will call the failure endpoint if an incorrect myshopify domain is entered. Cheers!

@christhomson awesome, thank you!