Devise + Omniauth - How to pass extra parameters along?

后端 未结 3 1447
孤独总比滥情好
孤独总比滥情好 2020-11-29 21:38

I have the ability in the app to load /users/auth/facebook to connect to facebook. I want to be able to know where the request came from. Whether it was from a user who is r

3条回答
  •  广开言路
    2020-11-29 22:08

    You have to use the :params options, as in

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

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

提交回复
热议问题