What is the primary purpose of using JSON Web Tokens (JWT) in authentication?
- Storing user passwords securely
- Encoding user data in URL parameters
- Storing user sessions on the server
- Securely transmitting information between parties
The primary purpose of using JSON Web Tokens (JWT) in authentication is to securely transmit information between parties. JWTs are used to authenticate users and ensure that data exchanged between the client and server remains tamper-proof and confidential. They are commonly used in web applications to maintain user sessions without the need to store session data on the server. The other options do not represent the primary purpose of JWTs.
Loading...
Related Quiz
- How can you handle error events emitted by the request object in the http module?
- You are building a real-time data processing system where tasks are dependent on the completion of previous tasks. How would you structure your Promises/async functions to ensure the sequence is maintained?
- Which method is commonly used in Node.js to handle errors in callbacks?
- In Express.js, the :id? in a route path like "/users/:id?" denotes that id is a(n) ______ parameter.
- You are developing an application with multiple user roles, and each role has different levels of access to resources. How would you securely implement role-based access control to prevent unauthorized access?