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({ ) : ( - Waiting for auth... + Waiting for auth... (Press ESC to cancel) )}