Skip to content

Possible to add env to all warden hooks #209

@jonathansimmons

Description

@jonathansimmons

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions