~cytrogen/masto-fe

39c723664998e73778a528ed0d467faed2c160dc — CSDUMMI 3 years ago 1d0ad55
Redirect users to SLO at the IdP after logging them out of Mastodon. (#24020)

1 files changed, 5 insertions(+), 1 deletions(-)

M app/controllers/application_controller.rb
M app/controllers/application_controller.rb => app/controllers/application_controller.rb +5 -1
@@ 61,7 61,11 @@ class ApplicationController < ActionController::Base
  end

  def after_sign_out_path_for(_resource_or_scope)
    new_user_session_path
    if ENV['OMNIAUTH_ONLY'] == 'true' && ENV['OIDC_ENABLED'] == 'true'
      '/auth/auth/openid_connect/logout'
    else
      new_user_session_path
    end
  end

  protected