Skip to content

Commit

Permalink
Print auth verify URL if browser can't be opened
Browse files Browse the repository at this point in the history
  • Loading branch information
ipmb committed Sep 28, 2021
1 parent 9a2c21a commit ef54b9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/auth.go
Expand Up @@ -44,7 +44,10 @@ var loginCmd = &cobra.Command{
checkErr(err)
data := *dataPtr
fmt.Println("Your verification code is", data.UserCode)
browser.OpenURL(data.VerificationURIComplete)
err = browser.OpenURL(data.VerificationURIComplete)
if err != nil {
fmt.Printf("URL: %s\n", aurora.White(data.VerificationURIComplete))
}
pauseUntilEnter("Finish verification in your web browser then press ENTER to continue.")
userInfo, err := auth.LoginComplete(data.DeviceCode)
checkErr(err)
Expand Down

0 comments on commit ef54b9c

Please sign in to comment.