login_oauth.go
6.76 KB
-
Fix OAuth error due to SameSite cookie policy (#18332) · 69b7b8bb
The `oauth_state` cookie used to be created with the SameSite value set according to the `cookie_samesite` configuration. However, due to a Safari bug SameSite=None or SameSite=invalid are treated as Strict which results in "missing saved state" OAuth login failures because the cookie is not sent with the redirect requests to the OAuth provider. This commit always creates the `oauth_state` cookie with SameSite=Lax to compensate for this.
Sofia Papagiannaki committed