Skip to content

Commit

Permalink
fix: append callback parameter after joining url path (#3993)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathnogueira committed Aug 28, 2024
1 parent 6ec7f6b commit 0a57188
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/pkg/oauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ func (s *OAuthServer) GetAuthJWT() error {
return fmt.Errorf("failed to start oauth server: %w", err)
}

loginUrl, err := neturl.JoinPath(s.frontendEndpoint, fmt.Sprintf("oauth?callback=%s", url))
loginUrl, err := neturl.JoinPath(s.frontendEndpoint, "oauth")
if err != nil {
return fmt.Errorf("could not build path: %w", err)
}

loginUrl += fmt.Sprintf("?callback=%s", url)

ui := ui.DefaultUI
err = ui.OpenBrowser(loginUrl)
if err != nil {
Expand Down

0 comments on commit 0a57188

Please sign in to comment.