Rails 3 + Omniauth. When a user clicks "Don't Allow" for FB, how can I customize the response
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
精彩评论