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
Due to the prependToMiddlewarePriority method in the Laravel Sanctum service provider, any middlewares added using the pushMiddlewareToGroup method in a package that is loaded before Sanctum, are removed from the group.
Steps To Reproduce:
Create a package that is loaded before Laravel Sanctum.
In the boot method of a service provider, in that package, use the pushMiddlewareToGroup function to add a middleware to the web group.
The middleware will not be applied, as it is removed from the group afterwards.
I can confirm that manually removing the line from the Sanctum service provider OR manually reordering the packages in the bootstrap file fixes the issue.
The text was updated successfully, but these errors were encountered:
Unfortunately because the method in Sanctum is needed to make Sanctum work properly. Right now, we cannot account for third party packages manipulating this behavior. We would however, appreciate any PR to improve this and allow third party packages to integrate better while still allowing Sanctum to continue to work for existing apps.
Description:
[Previously noted in this issue: #42004]
Due to the
prependToMiddlewarePriority
method in the Laravel Sanctum service provider, any middlewares added using thepushMiddlewareToGroup
method in a package that is loaded before Sanctum, are removed from the group.Steps To Reproduce:
pushMiddlewareToGroup
function to add a middleware to the web group.I can confirm that manually removing the line from the Sanctum service provider OR manually reordering the packages in the bootstrap file fixes the issue.
The text was updated successfully, but these errors were encountered: