fix: Only set GrantType once (#353)
This fixes an issue where, when using the device authorization flow, the grant type would be set twice. Some OPs don't accept this, and fail when polling. With this fix the grant type is only set once, which will make some OPs happy again. Fixes #352
This commit is contained in:
parent
b7d18bfd02
commit
1a2db3683f
2 changed files with 1 additions and 2 deletions
|
@ -12,7 +12,6 @@ import (
|
|||
func newDeviceClientCredentialsRequest(scopes []string, rp RelyingParty) (*oidc.ClientCredentialsRequest, error) {
|
||||
confg := rp.OAuthConfig()
|
||||
req := &oidc.ClientCredentialsRequest{
|
||||
GrantType: oidc.GrantTypeDeviceCode,
|
||||
Scope: scopes,
|
||||
ClientID: confg.ClientID,
|
||||
ClientSecret: confg.ClientSecret,
|
||||
|
|
|
@ -241,7 +241,7 @@ type TokenExchangeRequest struct {
|
|||
}
|
||||
|
||||
type ClientCredentialsRequest struct {
|
||||
GrantType GrantType `schema:"grant_type"`
|
||||
GrantType GrantType `schema:"grant_type,omitempty"`
|
||||
Scope SpaceDelimitedArray `schema:"scope"`
|
||||
ClientID string `schema:"client_id"`
|
||||
ClientSecret string `schema:"client_secret"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue