Devise + Omniauth - How to pass extra parameters along?

后端 未结 3 1439
孤独总比滥情好
孤独总比滥情好 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:23

    For facebook use the 'state' parameter and pass what you want, but don't forget the encode.

    /users/auth/facebook?state=parameter
    

    You could send the parameter as a url form encoded json and then in the callback parse it.

提交回复
热议问题