You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I've just started looking into using this library and I seem to be running into a conflict with our use of devise_for in our routes.rb:
devise_for:users,module: 'auth'
As far as I can tell, the problem is that this line tries to access the :saml_sessions key in controllers, but that key doesn't exist.
But that controllers hash is actually a default hash as defined here in Devise. Devise is using the value of the module argument from the devise_for call to namespace this controller, but Auth::SamlSessionsController doesn't exist, its still Devise::SamlSessionsController.
I think a fix here is to unconditionally namespace the controllers with devise in the devise_saml_authenticatable function I linked to above, but I was hoping to get some feedback on this before I implement this patch. If this is a reasonable approach, I'm super happy to submit a PR!
It's also possible that I've missed something that lets this library work well with the module argument in devise_for. Any help is appreciated!
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up! The module option is new to me. I can guess at what it does, but I don't see how it works in the devise code. Does it make e.g. Auth::SessionsController instead of Devise::SessionsController? Do you know how this works in devise?
Does it make e.g. Auth::SessionsController instead of Devise::SessionsController
Yep, exactly! We wanted to move the Devise controllers into their own directory (specifically app/controllers/auth) for organizational purposes, and this module option lets us do that.
So what do you think of my proposed fix? In our local version of this repo I've changed:
Hi there, I've just started looking into using this library and I seem to be running into a conflict with our use of
devise_for
in ourroutes.rb
:As far as I can tell, the problem is that this line tries to access the
:saml_sessions
key incontrollers
, but that key doesn't exist.But that
controllers
hash is actually a default hash as defined here in Devise. Devise is using the value of themodule
argument from thedevise_for
call to namespace this controller, butAuth::SamlSessionsController
doesn't exist, its stillDevise::SamlSessionsController
.I think a fix here is to unconditionally namespace the controllers with
devise
in thedevise_saml_authenticatable
function I linked to above, but I was hoping to get some feedback on this before I implement this patch. If this is a reasonable approach, I'm super happy to submit a PR!It's also possible that I've missed something that lets this library work well with the
module
argument indevise_for
. Any help is appreciated!The text was updated successfully, but these errors were encountered: