omniauth / omniauth-saml

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

Getting runtime error Invalid settings, idp_sso_target_url is not set! #204

Closed rajangdavis closed 2 years ago

rajangdavis commented 2 years ago

When a user has some misconfigured idp query param, the server has a runtime error of Invalid settings, idp_sso_target_url is not set!.

The stacktrace indicates that this error arises from the ruby-saml-1.11.0 gem when the omniauth-saml-1.10.1 gem is calling the create method from the Authrequest class on line 42 in the /lib/omniauth/strategies/saml.rb file.

If I modify the SAML class to include option :idp_sso_target_url, 'http://localhost:3000/users/auth/saml' as part of the options, this seems to fix the issue in that I get redirected to the correct IDP and get logged into my QA environment; however, I am not sure that this is the correct behavior.

Is there some configuration that I need to make to resolve this error or is this something that needs to be fixed with the gem? I'm not sure what the correct behavior is supposed to be in this case as I am not too knowledgeable about SSO.

Thanks in advance, feel free to let me know if you need more information.

rajangdavis commented 2 years ago

This looks like a misconfiguration issue with the initializer.