Repository navigation
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? |
Answered by
albertcht
Apr 28, 2025
Replies: 2 comments
|
Exceptions thrown in middleware can only be handled in the exception handler.
|
0 replies
Answer selected by
kingIZZZY
|
Works 👍 thank you! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exceptions thrown in middleware can only be handled in the exception handler.
You can override
unauthenticatedfunction in your exception handler.