Skip to content

fix(cli): read Go Windows credentials via findCredentials#5423

Merged
jgoux merged 8 commits into
supabase:developfrom
Versa-Sync-Studios:fix/windows-go-credential-read
Jun 2, 2026
Merged

fix(cli): read Go Windows credentials via findCredentials#5423
jgoux merged 8 commits into
supabase:developfrom
Versa-Sync-Studios:fix/windows-go-credential-read

Conversation

@Versa-Sync-Studios
Copy link
Copy Markdown
Contributor

Fixes #5415.

The Windows fallback added for Go-written credentials used Entry.withTarget(...).getPassword().

On Windows, that does not read the Go-shaped target credential correctly. findCredentials(service, target) can read it, so this uses that path for the Go Windows target while preserving the existing default keyring and file fallback behavior.

The legacy credentials unit test now covers the target lookup path.

Tested with:

npx bun run .\node_modules\vitest\vitest.mjs run src/legacy/auth/legacy-credentials.layer.unit.test.ts --config vitest.config.ts

Copy link
Copy Markdown
Contributor

@jgoux jgoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! I added small changes, can you confirm it works before merging?

@Versa-Sync-Studios
Copy link
Copy Markdown
Contributor Author

Tested the updated branch on local Windows and on a clean windows-latest GitHub Actions runner.

I used supabase@2.102.0 login --token to write a Go keyring credential under the supabase-staging profile, then ran the current legacy TS projects list path from this branch.

Results:

  • Before writing the credential, the command fails with Access token not provided.
  • After the Go-written credential exists, it no longer fails with Access token not provided.
  • It also no longer fails with Invalid access token format after the latest decode commit.
  • With the fake token, it reaches the expected Unauthorized response, which confirms the credential was read and decoded.

I also reran the focused unit test locally:

npx bun run .\node_modules\vitest\vitest.mjs run src/legacy/auth/legacy-credentials.layer.unit.test.ts --config vitest.config.ts

Result: 17 tests passed.

@jgoux jgoux enabled auto-merge (squash) June 2, 2026 15:25
@jgoux
Copy link
Copy Markdown
Contributor

jgoux commented Jun 2, 2026

Thanks for pushing this to the finish line! 🙏

@jgoux jgoux merged commit a1259d6 into supabase:develop Jun 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows credential regression in CLI v2.103.0: login succeeds but commands cannot read persisted access token

2 participants