mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: change oauth convert oidc cookie to SameSite=Lax (#9129)
The strict mode was blocking the cookie from being sent on the redirect flow. This worked on localhost because cookies behave differently on localhost
This commit is contained in:
@ -184,7 +184,9 @@ func (api *API) postConvertLoginType(rw http.ResponseWriter, r *http.Request) {
|
||||
Expires: claims.ExpiresAt.Time,
|
||||
Secure: api.SecureAuthCookie,
|
||||
HttpOnly: true,
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
// Must be SameSite to work on the redirected auth flow from the
|
||||
// oauth provider.
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
})
|
||||
httpapi.Write(ctx, rw, http.StatusCreated, codersdk.OAuthConversionResponse{
|
||||
StateString: stateString,
|
||||
|
Reference in New Issue
Block a user