devise_saml_authenticatable
devise_saml_authenticatable copied to clipboard
Unable to Create A New User When Password is Validated: config.saml_default_update_resource_hook not working
My application supports signing in with username/password and SSO. Logging in with an existing user works as expected, but when adding a new user via the IDP interface, my application throws ActiveRecord::RecordInvalid (Validation failed: Password can't be blank)
I read your suggestion to use config.saml_default_update_resource_hook
after config.saml_create_user
, but that doesn't work as the devise validation, on create new user, happens before the proc is called, triggering the error.
Any suggestion on how to proceed?
In default operation, the new user is saved using the saml_update_resource_hook
: https://github.com/apokalipto/devise_saml_authenticatable/blob/2d47b4fb948e76035da6d7c7df80d2167f35cba8/lib/devise_saml_authenticatable/model.rb#L68-L70.
Can I see your devise SAML configuration from config/initializers/devise.rb
, with any credentials or secrets removed?