-
Check List
ContentThe docs "Handling Unauthenticated Users" say When the auth middleware detects an unauthenticated user, it will throw Hypervel\Auth\AuthenticationException. You may catch this exception and customize your next steps, such as redirecting user to another route. Where in code should I actually catch it and redirect? Another preceding/wrapping middleware? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Exceptions thrown in middleware can only be handled in the exception handler.
|
Beta Was this translation helpful? Give feedback.
-
Works 👍 thank you! |
Beta Was this translation helpful? Give feedback.
Exceptions thrown in middleware can only be handled in the exception handler.
You can override
unauthenticated
function in your exception handler.