django sessions handle the authentication but using JS to fetch the data from a django API. How do I pass the session or token from django to the frontend JS? assuming someone is suthenticated should I hide some token in the DOM, add it in a script tag with django templates. Or is this just a bad idea?
I generally keep the login in a separate page from the SPA so once you are logged in, the requests handle the session automatically.
Обсуждают сегодня