Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing random url params to OmniAuth

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.

like image 842
snitko Avatar asked Nov 03 '11 18:11

snitko


1 Answers

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

like image 68
snitko Avatar answered Nov 29 '22 19:11

snitko