Question: 95
An enterprise needs to provide external users with secure ac...
A developer is working on a single-page application (SPA) that uses a JavaScript frontend to interact with stateless RESTful APIs for state-changing operations like profile updates. The application currently relies on session cookies for authentication and is vulnerable to Cross-Site Request Forgery (CSRF) attacks. The developer needs to implement a CSRF mitigation technique that:
Does not require storing additional state on the server.
Integrates seamlessly with the existing JavaScript frontend and stateless APIs.
Ensures that CSRF tokens cannot be predicted or forged by attackers.
Which of the following is the BEST solution for the developer to implement?
Share your thoughts, provide feedback, or discuss the question and answer below. You can also help others by answering their questions or providing additional information. Thank you for contributing! π
No comments yet. Be the first to comment!