Hi everyone, I got a question will trying to use omniauth-facebook with devise
I followed the video(just substitute twitter with facebook) and was able to get it work.
However, I would like to customize my routes a little bit, so this is what I did:
as I expected, in my url "users/..." was changed to "accounts/...", but when I tried to login via facebook, I got this error: Routing Error No route matches [GET] "/users/auth/facebook/callback"
after play around with it, I got around it by adding this line:
config/routes.rb
get '/users/auth/facebook/callback', to: redirect('/accounts/auth/facebook/callback')
It works fine now, but I think there must be better solution.
Is there any way to change the returned callback url from /users/auth/facebook/callback to /accounts/auth/facebook/callback ???
It turns out this is a stupid question...
I figured it out, in
facebook.js.coffee
just change the window locationHi everyone, I got a question will trying to use omniauth-facebook with devise
I followed the video(just substitute twitter with facebook) and was able to get it work.
However, I would like to customize my routes a little bit, so this is what I did:
as I expected, in my url "users/..." was changed to "accounts/...", but when I tried to login via facebook, I got this error:
Routing Error
No route matches [GET] "/users/auth/facebook/callback"
after play around with it, I got around it by adding this line:
It works fine now, but I think there must be better solution.
Is there any way to change the returned callback url from
/users/auth/facebook/callback
to/accounts/auth/facebook/callback
???Thanks!