Passing random url params to OmniAuth

只谈情不闲聊 提交于 2019-12-01 16:20:34

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/7999907/passing-random-url-params-to-omniauth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!