Hi all I am very new to Django and web dev in general so I would be grateful if any of you can point me in the right direction for the problem below.
So I have this problem where I need to create a centralized login server on the backend (So all user’s info will be stored in this DB, like Oauth and for the frontend, I will render the sites in another server.
The flow would be user enter the website, redirect to the login page at the auth server and redirect back to the front end server something like that.
I have actually followed the trail to learn the REST framework and created a few API endpoints with Token authentication with django-rest-knox, essentially the backend is ready.
Now the question is how can I make communication from the frontend to the user auth server? Many of the tutorials simply use django.contrib.auth
because the user auth is bundled on the same server. It is not simply as adding declarators like @login_required() something like that.
How do I store the token generated from the API into the browser and verify this token every time the page is refreshed or navigate to another page etc?
I have read some articles about using Vue/React to do this on top of Django but is it a necessity to do that?
Thanks.