Circle V2 API Docs
    Preparing search index...
    • Returns the user if they are logged in and their role is at least minRole in the hierarchy (e.g. "supervisor" allows supervisor, admin, superadmin). Otherwise redirects — to /unauthorized by default, or options.redirectTo.

      Display gating only: this is the route-level companion to the client useMinRole hook. The server (tRPC) remains the real authorization boundary.

      Parameters

      • minRole: UserRole
      • Optionaloptions: RequireRoleOptions

      Returns Promise<User>