Replies: 2 comments
-
Why would you need multiple guards by default? |
Beta Was this translation helpful? Give feedback.
0 replies
-
That kinda defeats the purpose of having a "default" wouldn't it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently we can define multiple auth guards via route middleware params, whereby the guards are applied to the request in the order they are defined:
It would be a nice feature to also be able to define multiple default guards in
config/auth.php
:An example use case for needing multiple default guards would be a situation whereby an API can authenticate via either session or token in the request header.
Edit: in hindsight this is a bad idea becuase calling
Auth::guard()
with no args is a common use case and needs to resolve to a single default guard 😁Beta Was this translation helpful? Give feedback.
All reactions