@@ -278,8 +278,8 @@ func (c *Config) AppInstallations(ctx context.Context, token string) ([]codersdk
278
278
}
279
279
280
280
type DeviceAuth struct {
281
- //Cfg is provided for the http client method.
282
- Cfg promoauth.InstrumentedOAuth2Config
281
+ //Config is provided for the http client method.
282
+ Config promoauth.InstrumentedOAuth2Config
283
283
ClientID string
284
284
TokenURL string
285
285
Scopes []string
@@ -302,10 +302,10 @@ func (c *DeviceAuth) AuthorizeDevice(ctx context.Context) (*codersdk.ExternalAut
302
302
}
303
303
304
304
do := http .DefaultClient .Do
305
- if c .Cfg != nil {
305
+ if c .Config != nil {
306
306
// The cfg can be nil in unit tests.
307
307
do = func (req * http.Request ) (* http.Response ,error ) {
308
- return c .Cfg .Do (ctx ,promoauth .SourceAuthorizeDevice ,req )
308
+ return c .Config .Do (ctx ,promoauth .SourceAuthorizeDevice ,req )
309
309
}
310
310
}
311
311
@@ -483,7 +483,7 @@ func ConvertConfig(instrument *promoauth.Factory, entries []codersdk.ExternalAut
483
483
return nil ,xerrors .Errorf ("external auth provider %q: device auth url must be provided" ,entry .ID )
484
484
}
485
485
cfg .DeviceAuth = & DeviceAuth {
486
- Cfg : cfg ,
486
+ Config : cfg ,
487
487
ClientID :entry .ClientID ,
488
488
TokenURL :oc .Endpoint .TokenURL ,
489
489
Scopes :entry .Scopes ,