Make ClientID a parameter
This commit is contained in:
parent
c9290a051d
commit
045fbfead8
6
auth.go
6
auth.go
|
@ -191,12 +191,10 @@ func CreateAuthorizationURL(authURL url.URL, meURL, clientID, redirectURI, state
|
|||
return authURL.String()
|
||||
}
|
||||
|
||||
func VerifyAuthCode(code, redirectURI, authEndpoint string) (bool, *AuthResponse, error) {
|
||||
const ClientID = "https://p83.nl/track-me"
|
||||
|
||||
func VerifyAuthCode(clientID, code, redirectURI, authEndpoint string) (bool, *AuthResponse, error) {
|
||||
reqData := url.Values{}
|
||||
reqData.Set("code", code)
|
||||
reqData.Set("client_id", ClientID)
|
||||
reqData.Set("client_id", clientID)
|
||||
reqData.Set("redirect_uri", redirectURI)
|
||||
|
||||
req, err := http.NewRequest(http.MethodPost, authEndpoint, strings.NewReader(reqData.Encode()))
|
||||
|
|
Loading…
Reference in New Issue
Block a user