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

    Variable getCurrentUserConst

    getCurrentUser: () => Promise<CurrentUser | null> = ...

    Returns the signed-in user, or null if no valid session exists.

    Verifies the session token's signature via getClaims rather than trusting the raw cookie (getSession). Wrapped in React's cache() so it executes at most once per request regardless of how many callers invoke it.

    Type Declaration

      • (): Promise<CurrentUser | null>
      • Returns Promise<CurrentUser | null>

        The current user, or null when unauthenticated.