Answer the question
In order to leave comments, you need to log in
How to secure a project with a completely separate front-end and back-end?
I am working on a project in which the front and back parts are completely separated, located on different servers and communicate with each other exclusively through the API. The frontend is written in React by another developer.
I am responsible for the backing, I had no experience of working with such a scheme before.
Accordingly, I am concerned about security issues, tk. this is my area of responsibility.
In particular - how to make authentication secure?
So far I have done this: for example, when logging into a personal account on the server, a token is generated and stored in the database, given to the front, it saves it in cookies or local storage, with each GET or POST request, this token is transmitted to the back, compared with what is saved in the database and if it is found, then further actions are allowed. The token is associated with a user ID and has a limited lifetime.
How safe is it and how to protect yourself from request forgery in general?
What other security issues need to be addressed?
Answer the question
In order to leave comments, you need to log in
What other security issues need to be addressed?
1. It would be good to read OWASP.org to know what SQL injections and XSS are.
2. Stop making a bike, when you make it again and again, the likelihood of crap increases, so use frameworks. For example django-rest-framework
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question