Niche API Documentation - v0.1.0
    Preparing search index...

    Function requireUser

    • Returns the signed-in user, or redirects to /login.

      Use at the top of every Server Action and data function that requires authentication. Never returns null — a missing session triggers a redirect.

      Returns Promise<CurrentUser>

      The current user.

      Redirects to /login when no session is present.