From eb45bed7d9e9d3b64998b374ee87cb3cc15719a2 Mon Sep 17 00:00:00 2001 From: = Date: Sun, 21 Jul 2024 22:34:23 +0530 Subject: [PATCH] feat: updated text over cli --- cli/packages/cmd/login.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/cli/packages/cmd/login.go b/cli/packages/cmd/login.go index 720c33dbf..2f85719fe 100644 --- a/cli/packages/cmd/login.go +++ b/cli/packages/cmd/login.go @@ -717,19 +717,13 @@ func askForMFACode() string { func askToPasteJwtToken(stdin *readline.CancelableStdin, success chan models.UserCredentials, failure chan error) { time.Sleep(time.Second * 5) - prompt := &promptui.Prompt{ - Label: "Did you see a prompt in your browser asking you to paste a token?", - IsConfirm: true, - Stdin: stdin, + Label: "Press ENTER to paste your token manually", + Stdin: stdin, } _, err := prompt.Run() if err != nil { - if errors.Is(err, promptui.ErrAbort) { - stdin.Close() - return - } failure <- err return } @@ -747,7 +741,8 @@ func askToPasteJwtToken(stdin *readline.CancelableStdin, success chan models.Use userCredentials, err := decodePastedBase64Token(infisicalPastedToken) if err != nil { - failure <- err + fmt.Println("Invalid user credentials provided", err) + os.Exit(1) return } success <- *userCredentials