Skip to content

Commit 92b2d28

Browse files
committed
include client_secret in request to device auth url
1 parent 74b7dc8 commit 92b2d28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

path_oidc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ func (b *jwtAuthBackend) authURL(ctx context.Context, req *logical.Request, d *f
609609

610610
values := url.Values {
611611
"client_id": {config.OIDCClientID},
612+
"client_secret": {config.OIDCClientSecret},
612613
"scope": {strings.Join(scopes, " ")},
613614
}
614615
body, err := contactIssuer(caCtx, config.OIDCDeviceAuthURL, &values, false)
@@ -625,7 +626,7 @@ func (b *jwtAuthBackend) authURL(ctx context.Context, req *logical.Request, d *f
625626
}
626627
err = json.Unmarshal(body, &deviceCode)
627628
if err != nil {
628-
return nil, errwrap.Wrapf("error decoding issuer response to device auth: {{err}}", err)
629+
return nil, fmt.Errorf("error decoding issuer response to device auth: %v; response: %v", err, string(body))
629630
}
630631
// currently hashicorp/cap/oidc.NewRequest requires
631632
// redirectURL to be non-empty so throw in place holder

0 commit comments

Comments
 (0)