omniauth / omniauth_openid_connect

MIT License
168 stars 187 forks source link

Add logout_path option to permit various logout paths #143

Closed CSDUMMI closed 1 year ago

CSDUMMI commented 1 year ago

Currently this gem only redirects to the end_session_uri if the current path matches a logout_path_pattern ending in /logout.

This /logout is a constant string in the source code and cannot be changed through options.

As there are applications (e.g. Mastodon) that use a different path ending for their logout path (e.g. /auth/sign_out), I believe that an option should be added (defaulting to /logout) to supply a different ending and allowing these applications to use OmniAuth OpenID Connect with logout enabled.

stanhu commented 1 year ago

Could you:

  1. Add an entry in README.md describing this option.
  2. Add a test covering this.

This is probably a side issue, but it seems that /logoutfoobar and /logout might also match. I'm wondering if we want to make the default option /logout/?$ or something of the sort.

CSDUMMI commented 1 year ago

I've added an entry for the option and a test case that passes locally.

On your side issue: I don't know enough about Regex notation in Ruby to say something about that.

CSDUMMI commented 1 year ago

What is needed to merge this PR?