import Link from "next/link" type SearchParams = Promise> function getSingleValue(input: string | string[] | undefined): string | undefined { if (Array.isArray(input)) { return input[0] } return input } export default async function UnauthorizedPage({ searchParams }: { searchParams: SearchParams }) { const params = await searchParams const required = getSingleValue(params.required) const scope = getSingleValue(params.scope) const reason = getSingleValue(params.reason) return (

Admin App

Access denied

You do not have the required role/permission for this admin route.

Reason
{reason ?? "insufficient-permission"}
Required permission
{required ?? "n/a"}
Required scope
{scope ?? "n/a"}
Back to dashboard
) }