summaryrefslogtreecommitdiff
path: root/packages/cli/src
diff options
context:
space:
mode:
authormatt korwel <[email protected]>2025-06-20 11:33:31 -0700
committerGitHub <[email protected]>2025-06-20 18:33:31 +0000
commit3283f55e7ec46808638c8ee5cce24027c9696086 (patch)
tree83c16ffd06e071d524d2dcc97ee956e25a84647b /packages/cli/src
parentddb32a36142ec900f0aa7c77c7088c93730650b0 (diff)
Auth timeout (#1263)
Diffstat (limited to 'packages/cli/src')
-rw-r--r--packages/cli/src/ui/components/AuthInProgress.tsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/cli/src/ui/components/AuthInProgress.tsx b/packages/cli/src/ui/components/AuthInProgress.tsx
index 804e2ff8..196097f2 100644
--- a/packages/cli/src/ui/components/AuthInProgress.tsx
+++ b/packages/cli/src/ui/components/AuthInProgress.tsx
@@ -5,7 +5,7 @@
*/
import React, { useState, useEffect } from 'react';
-import { Box, Text } from 'ink';
+import { Box, Text, useInput } from 'ink';
import Spinner from 'ink-spinner';
import { Colors } from '../colors.js';
@@ -18,11 +18,17 @@ export function AuthInProgress({
}: AuthInProgressProps): React.JSX.Element {
const [timedOut, setTimedOut] = useState(false);
+ useInput((_, key) => {
+ if (key.escape) {
+ onTimeout();
+ }
+ });
+
useEffect(() => {
const timer = setTimeout(() => {
setTimedOut(true);
onTimeout();
- }, 30000);
+ }, 180000);
return () => clearTimeout(timer);
}, [onTimeout]);
@@ -42,7 +48,7 @@ export function AuthInProgress({
) : (
<Box>
<Text>
- <Spinner type="dots" /> Waiting for auth...
+ <Spinner type="dots" /> Waiting for auth... (Press ESC to cancel)
</Text>
</Box>
)}