I want to make request through curl or other stuff (Net::HTTP.get)
. How can I set request.env['omniauth.auth']
when I make request? What is request.env
in general?
For example, take a look at https://github.com/intridea/omniauth#integrating-omniauth-into-your-application
class SessionsController < ApplicationController
def create
@user = User.find_or_create_from_auth_hash(auth_hash)
self.current_user = @user
redirect_to '/'
end
protected
def auth_hash
request.env['omniauth.auth']
end
end
I don't know how to set request.env['omniauth.auth'] when I do curl