Kong/insomnia · error · Error

singleToken auth is not supported in scripting yet

Error message

singleToken auth is not supported in scripting yet

What it means

Not-implemented guard in toPreRequestAuth: the auth type is 'singleToken', which the scripting environment cannot yet serialize into pre-request auth options. Encountered when a request uses single-token based authentication in a scripting context.

Solutions

  1. Use bearer auth to set a single token from scripts
  2. Wait for singleToken support in the scripting environment
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:810 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26). Data as JSON: /api/errors/466e3a91a07ad95b. Report an issue: GitHub.

Appendix: source

Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:810

        type: 'asap',
        asap: [
          { key: 'disabled', value: auth.disabled ? 'true' : 'false' },
          { key: 'iss', value: auth.issuer || '' },
          { key: 'sub', value: auth.subject || '' },
          { key: 'aud', value: auth.audience || '' },
          { key: 'claims', value: auth.additionalClaims || '' },
          { key: 'kid', value: auth.keyId || '' },
          { key: 'privateKey', value: auth.privateKey || '' },
        ],
      };
    }
    case 'netrc': {
      // TODO: not supported yet
      throw new Error('netrc auth is not supported in scripting yet');
    }
    case 'singleToken': {
      // TODO: not supported yet
      throw new Error('singleToken auth is not supported in scripting yet');
    }
    default: {
      // @ts-expect-error - user can input any string
      throw new Error(`unknown auth type: ${auth.type}`);
    }
  }
}

View on GitHub (pinned to d9bb2b0142)