You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Don't forget to remove deprecated code on each major release!
23
23
24
24
- User login/logout features!
25
25
-`reactpy_django.hooks.use_auth` to provide **persistent**`login` and `logout` functionality to your components.
26
-
-`settings.py:REACTPY_AUTH_TOKEN_TIMEOUT` to control the maximum seconds before ReactPy no longer allows the browser to obtain a persistent login cookie.
26
+
-`settings.py:REACTPY_AUTH_TOKEN_MAX_AGE` to control the maximum seconds before ReactPy's login token expires.
27
27
-`settings.py:REACTPY_CLEAN_AUTH_TOKENS` to control whether ReactPy should clean up expired authentication tokens during automatic cleanups.
28
28
- Automatically convert Django forms to ReactPy forms via the new `reactpy_django.components.django_form` component!
29
29
- The ReactPy component tree can now be forcibly re-rendered via the new `reactpy_django.hooks.use_rerender` hook.
Copy file name to clipboardExpand all lines: docs/src/reference/settings.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -73,15 +73,15 @@ Dotted path to the Django authentication backend to use for ReactPy components.
73
73
74
74
---
75
75
76
-
### `#!python REACTPY_AUTH_TOKEN_TIMEOUT`
76
+
### `#!python REACTPY_AUTH_TOKEN_MAX_AGE`
77
77
78
78
**Default:**`#!python 30`
79
79
80
80
**Example Value(s):**`#!python 5`
81
81
82
-
Maximum seconds before ReactPy no longer allows the browser to obtain a login cookie.
82
+
Maximum seconds before ReactPy's login token expires.
83
83
84
-
This setting exists because Django's authentication design require cookies to retain login status. ReactPy is rendered via WebSockets, and browsers do not allow active WebSocket connections to modify cookies.
84
+
This setting exists because Django's authentication design requires cookies to retain login status. ReactPy is rendered via WebSockets, and browsers do not allow active WebSocket connections to modify cookies.
85
85
86
86
To work around this limitation, this setting provides a maximum validity period of a temporary login token. When `#!python reactpy_django.hooks.use_auth().login()` is called within your application, ReactPy will automatically create this temporary login token and command the browser to fetch it via HTTP.
0 commit comments