videosphere
    Preparing search index...

    Function getAuthenticatedUser

    • Reads the JWT session cookie from the request and returns the authenticated user profile. Returns null when the token is missing/invalid or the user no longer exists.

      Parameters

      • req: NextRequest

        The incoming request object.

      Returns Promise<User>

      The authenticated user profile or null.