Tutorials

WebChat and gateway auth troubleshooting: from token missing to recovery

Decision tree for gateway auth failures including gateway token missing.

High-frequency incident pattern

Most teams hit one of these:

  • gateway token missing
  • unstable auth pass rate
  • works locally but fails in production

References:

5-minute triage order

Follow this order only.

Layer 1: config existence

  1. verify token variable exists
  2. verify key name matches runtime lookup
  3. verify placeholder value was not deployed

Layer 2: runtime loading

  1. verify startup logs show loaded auth config
  2. verify env override precedence
  3. verify restart or rollout propagation

Layer 3: gateway forwarding

  1. verify auth header forwarding
  2. verify middleware does not strip fields
  3. verify CORS preflight is not blocked

Layer 4: permission scope

  1. verify token scope covers current endpoint
  2. verify token is not expired or revoked
  3. verify tenant token mapping in multi-tenant setups

Fast recovery actions

  1. validate full chain with a known-good test token
  2. unify token source across local and production
  3. version-control gateway header forward list
  4. add token health-check before release

Pass criteria

  1. gateway token missing no longer appears
  2. 20 consecutive requests pass auth
  3. expired token is rejected with stable error behavior
  4. logs can trace request ID to token status and reject reason

Next step: FAQ for gateway token missing.