Shopify/omniauth-shopify-oauth2

Issue with OAuth2 flow

archit opened this issue · 1 comments

Setup: Rails 4, omniauth-1.2.1, omniauth-shopify 0.1.0

config/initializers/omniauth.rb

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :shopify, ENV['SHOPIFY_API_KEY'], ENV['SHOPIFY_SHARED_SECRET'],
           scope: ENV['SHOPIFY_API_SCOPE']
end

I start the OAuth web flow by redirecting the user to /auth/shopify?shop=abcdxyz.myshopify.com. This correctly redirects me to the /admin/oauth/authorize page in my shopify store. There I accept the perms. When shopify redirects back to my callback, before it hits my rails controller for the callback, the omniauth strategy in the Rack middleware throws this error

http://cl.ly/image/2S3o3P3k2t38

Thoughts? I'm looking through the omniauth strategy, and the error is when its trying to create the password by appending the token from the strategy. But where does that token get set ? Also what kind of token is that?

False alarm, I was using the incorrect gem; doh!