ruby on rails - Devise + Omniauth - How to pass extra parameters along? -



ruby on rails - Devise + Omniauth - How to pass extra parameters along? -

i have ability in app load /users/auth/facebook connect facebook. want able know request came from. whether user registering facebook, or existing user wants connect facebook. based on type, responses different.

how can pass param along omniauth when authenticating. tried doing:

/users/auth/facebook?connect_action=signup_connect_to_facebook

but connect_action param didn't create when nail authenticationscontroller#create

ideas? thansk

you have utilize :params options, in

omniauth_authorize_path(:user, :facebook, var: 'value', var2: 'value2' )

and later in callback can access request.env['omniauth.params'] hash! :)

ruby-on-rails ruby-on-rails-3

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -