Fix redirection URL
authorr <r@freesoftwareextremist.com>
Tue, 17 Dec 2019 20:17:03 +0000 (20:17 +0000)
committerr <r@freesoftwareextremist.com>
Tue, 17 Dec 2019 20:17:03 +0000 (20:17 +0000)
service/service.go

index 93f22fa2e296e88b6b8b272cf313672f439c5ad5..5181475c595be82d0a17cd112890131872e4e275 100644 (file)
@@ -107,7 +107,7 @@ func (svc *service) GetAuthUrl(ctx context.Context, instance string) (
                }
        }
 
-       u, err := url.Parse(path.Join(instance, "/oauth/authorize"))
+       u, err := url.Parse("/oauth/authorize")
        if err != nil {
                return
        }
@@ -119,7 +119,7 @@ func (svc *service) GetAuthUrl(ctx context.Context, instance string) (
        q.Set("redirect_uri", svc.clientWebsite+"/oauth_callback")
        u.RawQuery = q.Encode()
 
-       redirectUrl = u.String()
+       redirectUrl = instanceURL + u.String()
 
        return
 }