开发者

Rails 3 + Omniauth. When a user clicks "Don't Allow" for FB, how can I customize the response

开发者 https://www.devze.com 2023-04-10 02:21 出处:网络
Right now if a user clicks \"Don\'t Allow\" the popup window goes back to the site with the error message: \"Could not authorize you from Facebook because \"The user denied your r开发者_如何学Goequest

Right now if a user clicks "Don't Allow" the popup window goes back to the site with the error message: "Could not authorize you from Facebook because "The user denied your r开发者_如何学Goequest."

Any ideas on how I can handle this failure in my auth controller so I can close the dialog?


i think you need to redirect the user if the authentication fail so add this to your routes :

  match 'auth/failure', to: redirect('/')

you can look at my example app here : https://github.com/senayar/facebook_connect

0

精彩评论

暂无评论...
验证码 换一张
取 消