In my Rails controller I have something like:
def authenticate_user!
if not current_user
# TODO: after login user should go back to the place she tried to get, not ref url
redirect_to user_omniauth_authorize_path(:facebook, :redirect_uri => 'http://localhost:3000/some-page-where-user-redirected-after-login')
end
end
How to pass the right facebook redirect_uri in user_omniauth_authorize_path?
I tried “:redirect_uri => ” but it doesn’t work.
I need to redirect user to the add comment form after she logins. Login is done through Facebook Omniauth Devise only.
If your currently signing the user in something like this:
then you can change to: