Possible to add env to all warden hooks
jonathansimmons opened this issue · 0 comments
jonathansimmons commented
Hey team,
I could be going about this all wrong, but I'll explain what we're trying to do.
We're using Devise in a rails app and have configured warden hooks in devise.rb to manage a single session login. Recently we've enhanced our app to include OAuth but noticed that the warden hooks fire 100% of the tie, and we're trying to work out a way to prevent this.
Our first thought was to do a path check in the warden hooks, but we've realized only the before_failure
hook has access to the rack env and, therefore, the current path.
Is there a technical reason the other warden hooks don't also have the env passed to them?