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
When passing a hash of options, or a Warden::Config instance to Warden::Manager#initialize (where the 'use' method eventually hits in a middleware instance), any passed :default_strategies are clobbered - or rather corrupted - and end up breaking the authenticate! method. This also happens when passing :scope_defaults into Warden::Manager#initialize. The only workable way to send config into Warden::Manager#initialize is with the block in the 'use' method. The expected behavior would seem to be that a hash, a Warden::Config instance, or a block passed to Warden::Manager#initialize would result in a manager instance with identical configuration.
Notice that default_strategies now has a key :_all, and worse, is now looking for a strategy called :default, which will raise an exception (unless skip_missing_strategies is always set, or unless a strategy named :default is explicitly defined).
In this case, the default_strategies are not being constructed by Warden::Config, and Warden::Manager does not correct the missing data. Is this intended behavior, or is this an issue with Warden::Config?
The text was updated successfully, but these errors were encountered:
When passing a hash of options, or a Warden::Config instance to Warden::Manager#initialize (where the 'use' method eventually hits in a middleware instance), any passed :default_strategies are clobbered - or rather corrupted - and end up breaking the authenticate! method. This also happens when passing :scope_defaults into Warden::Manager#initialize. The only workable way to send config into Warden::Manager#initialize is with the block in the 'use' method. The expected behavior would seem to be that a hash, a Warden::Config instance, or a block passed to Warden::Manager#initialize would result in a manager instance with identical configuration.
Breaking example:
Notice that default_strategies now has a key :_all, and worse, is now looking for a strategy called :default, which will raise an exception (unless skip_missing_strategies is always set, or unless a strategy named :default is explicitly defined).
Another breaking example:
In this case, the default_strategies are not being constructed by Warden::Config, and Warden::Manager does not correct the missing data. Is this intended behavior, or is this an issue with Warden::Config?
The text was updated successfully, but these errors were encountered: