-
Notifications
You must be signed in to change notification settings - Fork 206
Closed
Description
I was wondering if it's possible to set the failure_app per scope.
This is my current setup:
Rails.application.config.middleware.use Warden::Manager do |config|
config.failure_app = lambda { |env| SessionsController.action(:new).call(env) }
config.default_scope = :user
config.scope_defaults :backend, strategies: [:password], store: true, action: :backend_new
config.scope_defaults :frontend, strategies: [:password], store: true, action: :frontend_new
end
However, keeping everything REST-ful and since the scenario's of logging in from the backend or the frontend differ a lot, I'd rather be able to set the failure app to Backend::SessionsController.action(:new)
for one scope, and Frontend::SessionsController.action(:new)
for the other.
Is this possible, and if not, is there a reason for this, am I trying to solve this problem the wrong way?
schmijos
Metadata
Metadata
Assignees
Labels
No labels