app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def auth_redirect
    session[:pre_login_destination] = "#{request.base_url}#{request.path}"
    session[:required_scopes] = required_scopes.join(',')
    redirect_to login_path
  end
def auth_redirect session [ :pre_login_destination ] = "#{request.base_url}#{request.path}" session [ :required_scopes ] = required_scopes . join ( ',' ) redirect_to login_path end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .