Skip to content
Open
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
8 changes: 7 additions & 1 deletion src/cli/commands/auth/login.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Command } from "commander";
import { log } from "@clack/prompts";
import pWaitFor from "p-wait-for";
import open from "open";
import {
writeAuth,
generateDeviceCode,
Expand Down Expand Up @@ -30,9 +31,14 @@ async function generateAndDisplayDeviceCode(): Promise<DeviceCodeResponse> {

log.info(
`Verification code: ${theme.styles.bold(deviceCodeResponse.userCode)}` +
`\nPlease confirm this code at: ${deviceCodeResponse.verificationUri}`
`\nPlease confirm this code at: ${theme.colors.links(deviceCodeResponse.verificationUri)}`
);

// Auto-open browser in TTY environments
if (process.stdout.isTTY) {
await open(deviceCodeResponse.verificationUri);
}

return deviceCodeResponse;
}

Expand Down
Loading