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.
did you consider the Devise provided helper sign_in_and_redirect(resource_or_scope, *args) (details can be found here)? You also get sign_out_and_redirect(resource_or_scope) amongst others.
Q2. do try inspecting session[:return_to] - it's most likely nil.