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 verify_authentication
    return true if current_user&.authenticated?
    session["return_to"] = request.original_url
    redirect_to(ENV["SSO_URL"])
  end
def verify_authentication return true if current_user &. authenticated? session [ "return_to" ] = request . original_url redirect_to ( ENV [ "SSO_URL" ] ) end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .
# TODO(alex): right now, in demo and local dev, current_user # will return a stub user session and never be nil, so we'll # never hit the line below. this could probably be refactored # for clarity.