Handler invoked when an authenticated user is denied access during Next.js middleware execution due to group authorization rules.
This callback allows you to customize how authorization failures are handled, for example by redirecting, rewriting, or returning a custom response.
The incoming Next.js request.
The associated Next.js fetch event.
The authenticated user who failed the group authorization check.
A middleware result that determines how the request should proceed.
Handler invoked when an authenticated user is denied access during Next.js middleware execution due to group authorization rules.
This callback allows you to customize how authorization failures are handled, for example by redirecting, rewriting, or returning a custom response.