Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitlab's logout does not redirect to CAS logout #48

Open
tkaito opened this issue Dec 14, 2016 · 2 comments
Open

Gitlab's logout does not redirect to CAS logout #48

tkaito opened this issue Dec 14, 2016 · 2 comments

Comments

@tkaito
Copy link

tkaito commented Dec 14, 2016

Hi, I'm trying to use omniauth-cas3-1.1.3 with gitlab-8.14.4.
I successfully logged in to gitlab via CAS, but when I logged out, gitlab des not redirect to CAS logout.

gitlab_rails['omniauth_providers'] = [
  {
    "name"=> "cas3",
    "label"=> "cas",
    "args"=> {
      "url"=> 'http://127.0.0.1:8000',
      "login_url"=> '/cas/login',
      "service_validate_url"=> '/cas/p3/serviceValidate',
      "logout_url"=> '/cas/logout',
    }
  }
]

Or should I use "on_single_sign_out"? But I don't know how to use it.

Started DELETE "/users/sign_out" for 192.168.135.150 at 2016-12-14 00:33:12 -0800
Processing by SessionsController#destroy as HTML
  Parameters: {"authenticity_token"=>"**********"}
Redirected to http://192.168.135.150/users/sign_in
Completed 302 Found in 51ms (ActiveRecord: 7.0ms)
Started GET "/users/sign_in" for 192.168.135.150 at 2016-12-14 00:33:12 -0800
Processing by SessionsController#new as HTML
Redirected to http://192.168.135.150/users/auth/cas3
Filter chain halted as :auto_sign_in_with_provider rendered or redirected
Completed 302 Found in 37ms (ActiveRecord: 3.9ms)
Started GET "/users/auth/cas3" for 192.168.135.150 at 2016-12-14 00:33:12 -0800
Processing by OmniAuth::RequestForgeryProtection::Controller#index as HTML
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
Started GET "/users/auth/cas3/callback?ticket=**********&url=http%3A%2F%2F192.168.135.150%2F" for 192.168.135.150 at 2016-12-14 00:33:12 -0800
Processing by OmniauthCallbacksController#cas3 as HTML
  Parameters: {"ticket"=>"**********", "url"=>"http://192.168.135.150/"}
Redirected to http://192.168.135.150/
Completed 302 Found in 147ms (ActiveRecord: 21.9ms)
Started GET "/" for 192.168.135.150 at 2016-12-14 00:33:12 -0800

Thanks,

@athariel
Copy link

Same problem here

@liaoguode
Copy link

maybe you can change the source code at app/controllers/application_controller.rb, add the logout url to be the function after_sign_out_path_for.

def after_sign_out_path_for(resource)
'http://127.0.0.1:8000/cas/logout'
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants