-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: oauth path building #3991
fix: oauth path building #3991
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
cli/pkg/oauth/oauth.go
Outdated
@@ -58,7 +59,7 @@ func (s *OAuthServer) GetAuthJWT() error { | |||
return fmt.Errorf("failed to start oauth server: %w", err) | |||
} | |||
|
|||
loginUrl := fmt.Sprintf("%soauth?callback=%s", s.frontendEndpoint, url) | |||
loginUrl := path.Join(s.frontendEndpoint, fmt.Sprintf("oauth?callback=%s", url)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loginUrl := path.Join(s.frontendEndpoint, fmt.Sprintf("oauth?callback=%s", url)) | |
loginUrl := url.JoinPath(s.frontendEndpoint, fmt.Sprintf("oauth?callback=%s", url)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to create an alias for url
as there is already an url
var in this scope.
neturl net/url
This PR fixes how we build oauth endpoint paths by replacing
fmt.Sprintf
withpath.Join
Checklist