Skip to content

Loading…

Updates auth response credential lookup to string key #30

Merged
merged 1 commit into from

3 participants

@jnormore

Auth response should use string key for credentials lookup. request.env['omniauth.auth'] does not return an indifferent access hash, it returns a hash with string keys. Test confirms this.

@gauravmc @edward Please review, thanks!

@davefp

LGTM :)

@gauravmc
Shopify member

:shipit:

@jnormore jnormore merged commit a7c8e19 into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 12, 2012
  1. @jnormore
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/generators/shopify_app/templates/app/controllers/sessions_controller.rb
View
2 lib/generators/shopify_app/templates/app/controllers/sessions_controller.rb
@@ -9,7 +9,7 @@ def create
def show
if response = request.env['omniauth.auth']
- sess = ShopifyAPI::Session.new(params[:shop], response[:credentials][:token])
+ sess = ShopifyAPI::Session.new(params[:shop], response['credentials']['token'])
session[:shopify] = sess
flash[:notice] = "Logged in"
redirect_to return_address
Something went wrong with that request. Please try again.