-
-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Current Situation
The login
function supplied by Django Channels provides non-persistent access to the Django session due to technical limitations.
To summarize the problem: ReactPy runs off of WebsSockets. Browsers do not allow active WebSocket connections to modify HTTP cookies. Django's authentication design requires HTTP cookies to persist Django login.
Proposed Actions
This might need to be implemented as a use_auth
hook.
On a technical level, the following will need to be developed:
- Server Side: Create a HTTP login view that accepts a UUID. This UUID will be attached to a session, which valid for 60 seconds (configurable). Somehow will need to refresh the
scope['session']
after a successful authentication. - Client Side: Perform the login/logout via client JavaScript using the upcoming
use_messenger
hook. Will likely be an AJAX HTTP POST request.
ento