6

I'm using omniauth with devise and I'm wondering how to pass url params and access them.

Here's a link example: /accounts/auth/facebook?do_something_after_return=1 Now I want to be able to retrieve this do_something_after_return in the callback. I don't care if it's saved in session or elsewhere. Problem is, I don't know where can I intercept this param.

What is the controller and the action that link /accounts/auth/facebook points to? Routes tell me nothing, it's simply not there. All I have in the routes is this /accounts/auth/:provider(.:format {:controller=>"accounts/omniauth_callbacks", :action=>"passthru"} which is a callback.

orion3
  • 9,797
  • 14
  • 67
  • 93
  • See also: [Devise + Omniauth - How to pass extra parameters along?](https://stackoverflow.com/questions/6657727/devise-omniauth-how-to-pass-extra-parameters-along) – Damien Oct 08 '15 at 05:53

1 Answers1

15

Params are captured in env["omniauth.params"].

orion3
  • 9,797
  • 14
  • 67
  • 93