summaryrefslogtreecommitdiff
path: root/internal/oauth/oauth.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/oauth/oauth.go')
-rw-r--r--internal/oauth/oauth.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/oauth/oauth.go b/internal/oauth/oauth.go
index 924b434..c11179c 100644
--- a/internal/oauth/oauth.go
+++ b/internal/oauth/oauth.go
@@ -490,7 +490,12 @@ func (oauth *OAuth) AuthURL(name string, postProcessAuth func(string) string) (s
"redirect_uri": fmt.Sprintf("http://127.0.0.1:%d/callback", port),
}
- u, err := httpw.ConstructURL(oauth.BaseAuthorizationURL, params)
+ p, err := url.Parse(oauth.BaseAuthorizationURL)
+ if err != nil {
+ return "", errors.WrapPrefix(err, fmt.Sprintf("failed to parse OAuth base URL '%s'", oauth.BaseAuthorizationURL), 0)
+ }
+
+ u, err := httpw.ConstructURL(p, params)
if err != nil {
return "", errors.WrapPrefix(err, "httpw.ConstructURL error", 0)
}