mcordell / grape_token_auth

Token auth for grape apps
MIT License
52 stars 19 forks source link

Fix session reading while using on Rails #43

Closed qd3v closed 8 years ago

qd3v commented 8 years ago

This is also cause empty values for attrs hash while reading it in omniauth_resource.rb, since info_hash has strings as keys:

def assign_provider_attrs
  info_hash = auth_hash['info']
  attrs = %i(nickname name image email).each_with_object({}) do |k, hsh|
    hsh[k] = info_hash.fetch(k, '')
  end
  resource.assign_attributes(attrs)
end