I'm currently developing an application based on React and Django.
I'm using Django rest Framework to create REST APIs that are consumed in the React frontend. This works pretty well.
I'm now willing to implement authentication using the Django session authentication system for the application. I could create authentication APIs. However, I would prefer using Django authentication system.
How can I use Django authentication views and forms in a React SPA?
A code snippet describing the overall architecture would be much appreciated. I can't figure out how to have the React app "calling Django code" (apart from DRF APIs)!
My question is about authentication, but I could reuse the same mechanism for other Django views.