Skip to content

Commit 6a23132

Browse files
authored
Merge pull request #369 from antpyykk-kone/feature/add-auth-cookie-security-option-docs
Add docs for new security variables WEBUI_AUTH_COOKIE_SAME_SITE & WEBUI_AUTH_COOKIE_SECURE
2 parents 1ad0ee9 + bd5b3e1 commit 6a23132

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/getting-started/advanced-topics/env-configuration.md

+40
Original file line numberDiff line numberDiff line change
@@ -597,12 +597,52 @@ requests initiated by third-party websites, but only over HTTPS.
597597
- Default: `lax`
598598
- Description: Sets the `SameSite` attribute for session cookies.
599599

600+
:::warning
601+
602+
When `ENABLE_OAUTH_SIGNUP` is enabled, setting `WEBUI_SESSION_COOKIE_SAME_SITE` to `strict` can cause login failures. This is because Open WebUI uses a session cookie to validate the callback from the OAuth provider, which helps prevent CSRF attacks.
603+
604+
However, a `strict` session cookie is not sent with the callback request, leading to potential login issues. If you experience this problem, use the default `lax` value instead.
605+
606+
:::
607+
600608
#### `WEBUI_SESSION_COOKIE_SECURE`
601609

602610
- Type: `bool`
603611
- Default: `False`
604612
- Description: Sets the `Secure` attribute for session cookies if set to `True`.
605613

614+
#### `WEBUI_AUTH_COOKIE_SAME_SITE`
615+
616+
- Type: `str` (enum: `lax`, `strict`, `none`)
617+
- Options:
618+
- `lax` - Sets the `SameSite` attribute to lax, allowing auth cookies to be sent with
619+
requests initiated by third-party websites.
620+
- `strict` - Sets the `SameSite` attribute to strict, blocking auth cookies from being sent
621+
with requests initiated by third-party websites.
622+
- `none` - Sets the `SameSite` attribute to none, allowing auth cookies to be sent with
623+
requests initiated by third-party websites, but only over HTTPS.
624+
- Default: `lax`
625+
- Description: Sets the `SameSite` attribute for auth cookies.
626+
627+
:::info
628+
629+
If the value is not set, `WEBUI_SESSION_COOKIE_SAME_SITE` will be used as a fallback.
630+
631+
:::
632+
633+
#### `WEBUI_AUTH_COOKIE_SECURE`
634+
635+
- Type: `bool`
636+
- Default: `False`
637+
- Description: Sets the `Secure` attribute for auth cookies if set to `True`.
638+
639+
:::info
640+
641+
If the value is not set, `WEBUI_SESSION_COOKIE_SECURE` will be used as a fallback.
642+
643+
:::
644+
645+
606646
#### `WEBUI_AUTH`
607647

608648
- Type: `bool`

0 commit comments

Comments
 (0)