videosphere
    Preparing search index...

    Function getAuthenticatedUserId

    • Reads the JWT session cookie from the request and returns the authenticated user id. Returns null when the token is missing or invalid.

      Parameters

      • req: NextRequest

        The incoming request object.

      Returns Promise<string>

      The authenticated user id if token and profile are valid; otherwise null.