Skip to content

Commit b0f2074

Browse files
authored
Always log the oauth url (#6)
* Always log the oauth url * Cleanup double logging of auth url
1 parent 619c882 commit b0f2074

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/tiger/cmd/oauth.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ func (l *oauthLogin) getAccessToken() (string, error) {
8282
}()
8383

8484
// Open browser
85-
fmt.Fprintln(l.out, "Opening browser for authentication...")
8685
authURL := server.oauthCfg.AuthCodeURL(state, oauth2.S256ChallengeOption(codeVerifier))
86+
fmt.Fprintf(l.out, "Auth URL is: %s\n", authURL)
87+
fmt.Fprintln(l.out, "Opening browser for authentication...")
8788
if err := openBrowser(authURL); err != nil {
88-
fmt.Fprintf(l.out, "Failed to open browser: %s\nPlease manually navigate to: %s\n", err, authURL)
89+
fmt.Fprintf(l.out, "Failed to open browser: %s\nPlease manually navigate to the Auth URL.", err)
8990
}
9091

9192
// Wait for callback with timeout

0 commit comments

Comments
 (0)