You are tasked with implementing an authentication system for your Express API. What considerations should you make regarding security, user experience, and scalability when choosing an authentication strategy?
- Use JWT (JSON Web Tokens) with long expiration times.
- Store plain text passwords in the database.
- Implement OAuth 2.0 for social login only.
- Use basic authentication over HTTP.
Using JWT with long expiration times might seem like a convenient option for user experience, but it could pose a security risk. Storing plain text passwords is a severe security vulnerability. Implementing OAuth 2.0 for social login only might not be sufficient for all authentication needs. Using basic authentication over HTTP is not secure. A robust authentication strategy should consider security (option 1) without compromising user experience and
Loading...
Related Quiz
- When the Event Loop encounters an asynchronous task, it offloads it to the ________ and continues to execute subsequent tasks.
- What would be the best way to handle errors in an Express application when building RESTful APIs?
- Which of the following ESLint rules enforces consistent indentation in your code?
- You are optimizing the performance of a web application that uses EJS for rendering views. The views have a lot of dynamic content and are currently slow to render. How would you approach optimizing the rendering performance of the EJS templates?
- How does cache eviction strategy LRU (Least Recently Used) work?