A Composer deploy's child process runs on an access token it cannot refresh

Open
#308 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start with packages/cli-engine/src/execution/spawn.ts and trace how credentials: "child" passes tokens and how the needs check refreshes them before Composer deploy and destroy handlers run. Confirm the behavior for a command that outlives the access token, then verify that both child commands can continue after token expiry without losing authentication.

Written by the indexing model from the issue text.

Description

Commands that declare credentials: "child" (Composer deploy and destroy) hand the child an access token only, never the refresh token (spawnToken in packages/cli-engine/src/execution/spawn.ts). The needs check refreshes the token before the handler runs if it has less than 5 minutes left, but a deploy that runs longer than the token's remaining lifetime fails mid-run.

Recorded in the prisma-cli-v8 project ledger, which is being deleted at close-out: https://github.com/prisma/prisma-cli/blob/4356b361adf7044bae59aa0bc70340eda89fdad6/.drive/projects/prisma-cli-v8/deferred.md#L177

🤖 Generated with Claude Code

Dominant language
TypeScript
Stars
26
Forks
4
Avg merge
12h 11m
Merged PRs (30d)
38

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from prisma/prisma-cli

All issues in prisma/prisma-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.