Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to add env to all warden hooks #209

Open
jonathansimmons opened this issue Jan 5, 2023 · 0 comments
Open

Possible to add env to all warden hooks #209

jonathansimmons opened this issue Jan 5, 2023 · 0 comments

Comments

@jonathansimmons
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant