Browse Source

Make ClientID a parameter

master
Peter Stuifzand 3 years ago
parent
commit
045fbfead8
  1. 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…
Cancel
Save