Module: Omniauth::Rails::Flash

Extended by:
ActiveSupport::Concern
Included in:
SessionsController
Defined in:
app/controllers/omniauth/rails/flash.rb

Instance Method Summary collapse

Instance Method Details

#set_url_to_return_to_after_authenticationObject



7
8
9
10
11
12
13
14
15
# File 'app/controllers/omniauth/rails/flash.rb', line 7

def set_url_to_return_to_after_authentication
  # TODO: Sanitize these urls, to avoid phishing attacks
  # See https://www.owasp.org/index.php/Unvalidated_Redirects_and_Forwards_Cheat_Sheet
  flash[:url_to_return_to_after_authentication] =
    # url_to_return_to_after_authentication_from_params ||
    url_to_return_to_after_authentication_from_flash ||
    # url_to_return_to_after_authentication_from_referer ||
    default_url_to_return_to_after_authentication
end