The unauthorized file is used to render UI when the unauthorized function is invoked during authentication. Along with allowing you to customize the UI, Next.js will return a 401 status code.
unauthorized.js components do not accept any props.
You can use unauthorized function to render the unauthorized.js file with a login UI.