Passante A Passante publication

En Passante

In Passing
Field Kit

A configured token can expire before the next request

A credential being present says nothing about whether it is still usable when a request runs.

What happened

Mail routes required a pre-set access token even though the application already held renewable credentials; the repair obtained a fresh access token from those credentials for each request unless an explicit static token was supplied.

2026-06-19 TypeScript · OAuth · request authentication measured: Access-token acquisition through existing renewable credentials
2 prompts, in order
  1. Trace credential lifetime An integration works immediately after setup and fails on later requests.
  2. Check renewal without exposing secrets The integration now exchanges renewable credentials before making its request.

1Trace credential lifetime

Run it when
An integration works immediately after setup and fails on later requests.
It asks you for
The credential types, token-selection code, request timing, refresh operation and non-secret failure status.
You get back
The actual token lifetime assumption and the path that should renew access.
It refuses if
Do not print tokens, authorization headers or credential-bearing provider errors.
copy this into a model
<stance>
Your job is to separate an observed failure from a convincing explanation that has never been checked. Keep the reader's actual system in view. A result is useful when another person can repeat the observation and get a different answer if the proposed repair is wrong.
</stance>

<inputs>
Ask for these before drawing a conclusion. Wait for anything essential that is missing.
1. The credential types, token-selection code, request timing, refresh operation and non-secret failure status.
2. The exact user-visible symptom, including the original output and the time it was observed.
3. The implementation and launch conditions responsible for that output. Read the relevant source in full.
4. What may be changed safely, and which actions require the owner's approval.
5. Any existing verification that could distinguish the proposed cause from the alternatives.
</inputs>

<method>
1. Identify the short-lived access token and the renewable credential by role. Read where each enters the application and when the application exchanges one for the other. Presence in configuration cannot establish current authorization.
2. Follow every affected request route. Determine whether it obtains a token at request time, reuses an old value, or depends on a manual environment edit. Keep this tracing separate from whether the downstream operation is allowed to run.
3. Inspect precedence of an explicit static token. A test override can prevent renewal even while renewable credentials are available. Record the selected path without reading the selected value aloud.
4. Read missing-credential and refresh-exception behavior. Name unresolved cases such as revocation and stale explicit overrides. Propose one shared acquisition path only when the existing routes have the same documented behavior.
</method>

<deliver>
- OBSERVED: the behavior actually established, with the output that supports it.
- EXPLANATION: what the observation settles and what remains unknown.
- NEXT ACTION: one bounded action, its owner, and its expected result.
- PROOF: the observation that would establish success, plus the result that would disprove it.
</deliver>

<refuse>
Do not print tokens, authorization headers or credential-bearing provider errors.
Do not invent measurements, defaults, source contents, or a successful run. Keep historical results separate from today's observations. Never transmit private inputs or perform a paid or external action just to complete this check. If access or authorization is missing, stop and name the exact missing condition.
</refuse>

2Check renewal without exposing secrets

Run it when
The integration now exchanges renewable credentials before making its request.
It asks you for
The acquisition implementation, existing safe authentication checks, override rules and redacted request outcomes.
You get back
Separate results for renewal, explicit override, missing credentials and refused renewal.
It refuses if
Do not send mail, archive records or invoke a paid model to prove authentication.
copy this into a model
<stance>
Your job is to separate an observed failure from a convincing explanation that has never been checked. Keep the reader's actual system in view. A result is useful when another person can repeat the observation and get a different answer if the proposed repair is wrong.
</stance>

<inputs>
Ask for these before drawing a conclusion. Wait for anything essential that is missing.
1. The acquisition implementation, existing safe authentication checks, override rules and redacted request outcomes.
2. The exact user-visible symptom, including the original output and the time it was observed.
3. The implementation and launch conditions responsible for that output. Read the relevant source in full.
4. What may be changed safely, and which actions require the owner's approval.
5. Any existing verification that could distinguish the proposed cause from the alternatives.
</inputs>

<method>
1. Start with existing isolated token-acquisition checks. Confirm the request consumes the token returned by the exchange instead of merely calling renewal and then using the old configuration value.
2. Exercise the explicit static-token branch through the existing safe check. Verify precedence matches the source and keep it visible in the result. An override succeeding does not prove renewable credentials were exercised.
3. Inspect missing and refused renewal results. No success claim should be produced for an operation that did not authenticate. Review diagnostics for secret-bearing raw errors as a separate requirement, since implementing refresh alone cannot establish safe error handling.
4. If real authentication verification is already authorized, use the provider's documented read-only check and report only status and expiry metadata. Otherwise state exactly which acquisition behaviors were checked locally and which provider observation remains unperformed.
</method>

<deliver>
- OBSERVED: the behavior actually established, with the output that supports it.
- EXPLANATION: what the observation settles and what remains unknown.
- NEXT ACTION: one bounded action, its owner, and its expected result.
- PROOF: the observation that would establish success, plus the result that would disprove it.
</deliver>

<refuse>
Do not send mail, archive records or invoke a paid model to prove authentication.
Do not invent measurements, defaults, source contents, or a successful run. Keep historical results separate from today's observations. Never transmit private inputs or perform a paid or external action just to complete this check. If access or authorization is missing, stop and name the exact missing condition.
</refuse>
How you know it worked

Trace the selected token. Trace the selected token from configuration through the actual request. Verify refreshing, explicit static-token precedence and refresh failure separately. Do not print credential values. This historical repair established a refresh path; it did not prove revoked credentials, privacy or every failure response were already handled correctly.

from a real incident, 2026-06-19 · stack TypeScript · OAuth · request authentication · verified by Access-token acquisition through existing renewable credentials · authenticationcredentialsintegrations

← every Field Kit