tls-devicer
    Preparing search index...

    Function validateLicense

    • Validate a Polar license key and return the resolved LicenseInfo.

      • Results are cached in-process for one hour.
      • If Polar is unreachable or the key is invalid the function returns { valid: false, tier: 'free', maxDevices: FREE_TIER_MAX_DEVICES } without throwing — validation failures are non-fatal.
      • The benefit_id in the Polar response is compared against POLAR_BENEFIT_IDS to decide the tier.

      Parameters

      • key: string

        The raw license key string provided by the user.

      Returns Promise<LicenseInfo>