@@ -155,7 +155,6 @@ type Options struct {
155155 GithubOAuth2Config * GithubOAuth2Config
156156 OIDCConfig * OIDCConfig
157157 PrometheusRegistry * prometheus.Registry
158- SecureAuthCookie bool
159158 StrictTransportSecurityCfg httpmw.HSTSConfig
160159 SSHKeygenAlgorithm gitsshkey.Algorithm
161160 Telemetry telemetry.Reporter
@@ -740,7 +739,7 @@ func New(options *Options) *API {
740739 StatsCollector : workspaceapps .NewStatsCollector (options .WorkspaceAppsStatsCollectorOptions ),
741740
742741 DisablePathApps : options .DeploymentValues .DisablePathApps .Value (),
743- SecureAuthCookie : options .DeploymentValues .SecureAuthCookie . Value () ,
742+ Cookies : options .DeploymentValues .HTTPCookies ,
744743 APIKeyEncryptionKeycache : options .AppEncryptionKeyCache ,
745744 }
746745
@@ -828,7 +827,7 @@ func New(options *Options) *API {
828827 next .ServeHTTP (w , r )
829828 })
830829 },
831- httpmw .CSRF (options .SecureAuthCookie ),
830+ httpmw .CSRF (options .DeploymentValues . HTTPCookies ),
832831 )
833832
834833 // This incurs a performance hit from the middleware, but is required to make sure
@@ -868,7 +867,7 @@ func New(options *Options) *API {
868867 r .Route (fmt .Sprintf ("/%s/callback" , externalAuthConfig .ID ), func (r chi.Router ) {
869868 r .Use (
870869 apiKeyMiddlewareRedirect ,
871- httpmw .ExtractOAuth2 (externalAuthConfig , options .HTTPClient , nil ),
870+ httpmw .ExtractOAuth2 (externalAuthConfig , options .HTTPClient , options . DeploymentValues . HTTPCookies , nil ),
872871 )
873872 r .Get ("/" , api .externalAuthCallback (externalAuthConfig ))
874873 })
@@ -1123,14 +1122,14 @@ func New(options *Options) *API {
11231122 r .Get ("/github/device" , api .userOAuth2GithubDevice )
11241123 r .Route ("/github" , func (r chi.Router ) {
11251124 r .Use (
1126- httpmw .ExtractOAuth2 (options .GithubOAuth2Config , options .HTTPClient , nil ),
1125+ httpmw .ExtractOAuth2 (options .GithubOAuth2Config , options .HTTPClient , options . DeploymentValues . HTTPCookies , nil ),
11271126 )
11281127 r .Get ("/callback" , api .userOAuth2Github )
11291128 })
11301129 })
11311130 r .Route ("/oidc/callback" , func (r chi.Router ) {
11321131 r .Use (
1133- httpmw .ExtractOAuth2 (options .OIDCConfig , options .HTTPClient , oidcAuthURLParams ),
1132+ httpmw .ExtractOAuth2 (options .OIDCConfig , options .HTTPClient , options . DeploymentValues . HTTPCookies , oidcAuthURLParams ),
11341133 )
11351134 r .Get ("/" , api .userOIDC )
11361135 })
0 commit comments