Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/petite-cities-lose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cipherstash/cli": minor
---

Fix invalid client error.
9 changes: 4 additions & 5 deletions packages/cli/src/commands/auth/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ export async function selectRegion(): Promise<string> {
return region
}

export async function login(region: string, referrer: string | undefined) {
export async function login(region: string, _referrer: string | undefined) {
const s = p.spinner()

const pending = await beginDeviceCodeFlow(
region,
`cli-${referrer ?? 'cipherstash'}`,
)
// Must be 'cli' — it's the only OAuth client_id registered with CTS.
// Passing anything else (e.g. `cli-supabase`) causes INVALID_CLIENT.
const pending = await beginDeviceCodeFlow(region, 'cli')

p.log.info(`Your code is: ${pending.userCode}`)
p.log.info(`Visit: ${pending.verificationUriComplete}`)
Expand Down
Loading