summaryrefslogtreecommitdiff
path: root/internal/oauth
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-05-02 11:12:14 +0200
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2023-09-25 09:43:37 +0200
commitbb7cca21efdef69cb72b38fa988ec769c0ccb05c (patch)
tree592a500a8147e0f46d67dc6bf48d2bb51b5d8189 /internal/oauth
parent250c2b81b922ad8c2ddc185af8b0f229dce78fc5 (diff)
OAuth: Always set the scheme to HTTPS for the authorization URL
Useful if the cache is busted
Diffstat (limited to 'internal/oauth')
-rw-r--r--internal/oauth/oauth.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/oauth/oauth.go b/internal/oauth/oauth.go
index f9bf164..cee6599 100644
--- a/internal/oauth/oauth.go
+++ b/internal/oauth/oauth.go
@@ -501,6 +501,8 @@ func (oauth *OAuth) AuthURL(name string, postProcessAuth func(string) string) (s
if err != nil {
return "", errors.WrapPrefix(err, fmt.Sprintf("failed to parse OAuth base URL '%s'", oauth.BaseAuthorizationURL), 0)
}
+ // Make sure the scheme is HTTPS
+ p.Scheme = "https"
u, err := httpw.ConstructURL(p, params)
if err != nil {