Skip to content

Commit 7e1fc85

Browse files
committed
Removed use of url.JoinPath with string concat - as url.JoinPath missing in CI build
1 parent 90e0efc commit 7e1fc85

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

providers/cognito/cognito.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ import (
44
"bytes"
55
"encoding/json"
66
"fmt"
7-
"io"
8-
"net/http"
9-
"net/url"
10-
117
"github.com/markbates/goth"
128
"golang.org/x/oauth2"
9+
"io"
10+
"net/http"
1311
)
1412

1513
// Provider is the implementation of `goth.Provider` for accessing AWS Cognito.
@@ -42,10 +40,10 @@ type Provider struct {
4240
// You should always call `cognito.New` to get a new provider. Never try to
4341
// create one manually.
4442
func New(clientID, secret, baseUrl, callbackURL string, scopes ...string) *Provider {
45-
issuerURL, _ := url.JoinPath(baseUrl, "/oauth2/default")
46-
authURL, _ := url.JoinPath(baseUrl, "/oauth2/authorize")
47-
tokenURL, _ := url.JoinPath(baseUrl, "/oauth2/token")
48-
profileURL, _ := url.JoinPath(baseUrl, "/oauth2/userInfo")
43+
issuerURL := baseUrl + "/oauth2/default"
44+
authURL := baseUrl + "/oauth2/authorize"
45+
tokenURL := baseUrl + "/oauth2/token"
46+
profileURL := baseUrl + "/oauth2/userInfo"
4947
return NewCustomisedURL(clientID, secret, callbackURL, authURL, tokenURL, issuerURL, profileURL, scopes...)
5048
}
5149

0 commit comments

Comments
 (0)