Merge pull request #1001 from CDN18/oauth-patch

add client_id and client_secret to exchangeOauthCode form
This commit is contained in:
Matt Baer 2024-08-15 20:21:16 -04:00 committed by GitHub
commit 884a479de6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,8 @@ func (c genericOauthClient) buildLoginURL(state string) (string, error) {
func (c genericOauthClient) exchangeOauthCode(ctx context.Context, code string) (*TokenResponse, error) {
form := url.Values{}
form.Add("client_id", c.ClientID)
form.Add("client_secret", c.ClientSecret)
form.Add("grant_type", "authorization_code")
form.Add("redirect_uri", c.CallbackLocation)
form.Add("scope", c.Scope)