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
"Remember me" checkbox during user log in is a common practice currently does not supported by implementations of ServerSideSessionBackend / ClientSideSessionBackend classes.
Basic Example
def set_session(self, value: dict[str, Any] | DataContainerType | EmptyType) -> None:
"""Set the session in the connection's ``Scope``.
If the :class:`SessionMiddleware <.middleware.session.base.SessionMiddleware>` is enabled, the session will be added
to the response as a cookie header.
Args:
value: Dictionary or pydantic model instance for the session data.
Returns:
None
"""
self.scope["session"] = value
I think the best way would be to add ability to set specific cookie params in 'set_session' method, they would be used over default ones specified in SessionAuth instance. Then add support for it for ServerSideSessionBackend / ClientSideSessionBackend.
Drawbacks and Impact
Need to be careful about backward compability but i think there should not be much of a problem.
Summary
"Remember me" checkbox during user log in is a common practice currently does not supported by implementations of ServerSideSessionBackend / ClientSideSessionBackend classes.
Basic Example
I think the best way would be to add ability to set specific cookie params in 'set_session' method, they would be used over default ones specified in SessionAuth instance. Then add support for it for ServerSideSessionBackend / ClientSideSessionBackend.
Drawbacks and Impact
Need to be careful about backward compability but i think there should not be much of a problem.
Unresolved questions
No response
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: