Skip to content

Commit 94b4aef

Browse files
committed
pass in the correct cookie options
1 parent ab2270f commit 94b4aef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

coderd/coderd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ func New(options *Options) *API {
868868
r.Route(fmt.Sprintf("/%s/callback", externalAuthConfig.ID), func(r chi.Router) {
869869
r.Use(
870870
apiKeyMiddlewareRedirect,
871-
httpmw.ExtractOAuth2(externalAuthConfig, options.HTTPClient, codersdk.HTTPCookieConfig{}, nil),
871+
httpmw.ExtractOAuth2(externalAuthConfig, options.HTTPClient, options.Cookies, nil),
872872
)
873873
r.Get("/", api.externalAuthCallback(externalAuthConfig))
874874
})
@@ -1123,14 +1123,14 @@ func New(options *Options) *API {
11231123
r.Get("/github/device", api.userOAuth2GithubDevice)
11241124
r.Route("/github", func(r chi.Router) {
11251125
r.Use(
1126-
httpmw.ExtractOAuth2(options.GithubOAuth2Config, options.HTTPClient, codersdk.HTTPCookieConfig{}, nil),
1126+
httpmw.ExtractOAuth2(options.GithubOAuth2Config, options.HTTPClient, options.Cookies, nil),
11271127
)
11281128
r.Get("/callback", api.userOAuth2Github)
11291129
})
11301130
})
11311131
r.Route("/oidc/callback", func(r chi.Router) {
11321132
r.Use(
1133-
httpmw.ExtractOAuth2(options.OIDCConfig, options.HTTPClient, codersdk.HTTPCookieConfig{}, oidcAuthURLParams),
1133+
httpmw.ExtractOAuth2(options.OIDCConfig, options.HTTPClient, options.Cookies, oidcAuthURLParams),
11341134
)
11351135
r.Get("/", api.userOIDC)
11361136
})

0 commit comments

Comments
 (0)