omniauth / omniauth-saml

A generic SAML strategy for OmniAuth
https://github.com/omniauth/omniauth-saml
Other
331 stars 205 forks source link

I18n error with SP-initiated SLO #218

Open dolsysmith opened 5 months ago

dolsysmith commented 5 months ago

Hi there,

I'm trying to implement single logout following the documentation, including the SessionsController as specified in the README. When I visit the /users/auth/saml/spslo endpoint directly, SLO works as expected. However, when using the Devise sign_out route, the app throws an error: I18n::InvalidLocale ("en/spslo" is not a valid locale). Using pry, I have confirmed that the user_saml_omniauth_authorize_path method is returning a URL like this: https://test.scholarspace.library.gwu.edu/users/auth/saml?locale=en, to which the /spslo is getting appended, hence the error.

I imagine I could get around it with a Regex in the sessions controller's after_sign_out_path_for method, but that feels hacky, so if there's a configuration somewhere I'm missing, I'd love to know.

I appreciate your help, and thanks for your work on this gem -- apart from this error, it's working like a charm.

Best, Dolsy