-
Notifications
You must be signed in to change notification settings - Fork 164
401 Unauthorized
Adam ⚛ Stegman edited this page Sep 16, 2020
·
1 revision
When you get a 401 Unauthorized error, that could indicate a few different things. There's a couple log messages for common issues:
- "Auth errors": https://github.com/apokalipto/devise_saml_authenticatable/blob/09221d59e434bc947327e478a388013a70add4f7/lib/devise_saml_authenticatable/strategy.rb#L43
- This indicates the SAML response was not valid with your configuration, and suggests a configuration issue, either in your SP or in your IdP.
- "Resource could not be found": https://github.com/apokalipto/devise_saml_authenticatable/blob/09221d59e434bc947327e478a388013a70add4f7/lib/devise_saml_authenticatable/strategy.rb#L50
- This means the user wasn't found, so it's possible the wrong attribute is being used to look up the user, or just that they need to be created by setting
Devise.saml_create_user = true
.
- This means the user wasn't found, so it's possible the wrong attribute is being used to look up the user, or just that they need to be created by setting
You can also set Devise.saml_failed_callback
to a class that has a #handle(saml_response, strategy)
method, and inspect the response and strategy yourself for problems.