</>
CodeWithZohaib
Toggle theme
Connect
Add
Jwt Programming Guide
All Topics
Basic Concepts (1-20)
Advanced Topics (21-40)
Pointers & Memory
Structures & Unions
File Handling
1. What is JWT (JSON Web Token)?
2. What are the components of a JWT?
3. How do you create a JWT?
4. How to verify a JWT?
5. What is Passport.js?
6. How do you set up Passport.js?
7. What is a Passport strategy?
8. What are sessions in Passport.js?
9. How to handle user login with Passport.js?
10. How to protect routes using Passport.js?
11. What is the purpose of the `passport.serializeUser` method?
12. What is the purpose of the `passport.deserializeUser` method?
13. How to implement logout with Passport.js?
14. What is the difference between authentication and authorization?
15. How to set up Google authentication with Passport.js?
16. How to store JWT in local storage?
17. How to send JWT in HTTP requests?
18. What is token expiration?
19. How to refresh a JWT?
20. What is Cross-Site Request Forgery (CSRF)?
21. How to implement CSRF protection in an Express app?
22. What is the purpose of JSON Web Signature (JWS)?
23. How to handle authentication errors in Passport.js?
24. What is the role of the `passport.authenticate()` method?
25. How to check if a user is authenticated in an Express route?
26. How to implement role-based access control (RBAC) with Passport.js?
27. How to handle token revocation?
28. What is the difference between symmetric and asymmetric signing in JWT?
29. How to handle JWT expiration in the client?
30. What are the security best practices for JWT?
31. How to implement password hashing?
32. What is the role of the `jsonwebtoken` library?
33. How to protect against SQL injection when using JWT?
34. What is the purpose of the `passport.session()` middleware?
35. How to implement user registration with Passport.js?
36. What is the purpose of `passport.initialize()`?
37. What is the difference between `req.user` and `req.session.passport.user`?
38. How to implement email verification?
39. What is the purpose of `passport-remember-me`?
40. How to implement two-factor authentication (2FA)?
41. How to implement role-based redirection after login?
42. How to set up CORS for API requests?
43. How to implement a logout functionality?
44. How to refresh JWT tokens?
45. What is the purpose of using environment variables?
46. How to implement password reset functionality?
47. How to protect sensitive routes?
48. How to implement user profile updates?
49. What is the purpose of using HTTPS?
50. How to handle concurrent requests with Passport.js?
51. How to log user activities?
52. What is the purpose of using bcrypt?
53. How to implement client-side token storage?
54. How to set token expiration in JWT?
55. How to validate user input during registration?
56. How to implement session expiration?
57. What are CSRF tokens, and how to implement them?
58. How to create a public/private key pair for JWT?
59. How to handle password strength validation?
60. How to implement account locking after multiple failed login attempts?