Rails 3 - Devise With OmniAuth - Redirect after signing in goes to /users/sign_in

后端 未结 3 770
滥情空心
滥情空心 2020-12-25 08:17

Im using devise with omniauth for signing in users with facebook. I want them to be redirected after signing in to the page they were on after before signing in.

I\'

3条回答
  •  自闭症患者
    2020-12-25 08:27

    You can pass a parameter like: /auth/facebook?referrer=/path/to/redirect

    After the Facebook authentication this parameter will be available to you in env["omniauth.params"].

提交回复
热议问题