RamakrushnaBiswal/PlayCafe

Feat: Set Up User Session Management

Opened this issue · 2 comments

Describe the feature

Description
After setting up login functionality, it's essential to manage user sessions. This will ensure users remain authenticated across requests, allowing access to protected routes.

Acceptance Criteria:

Session Middleware:
Use express-session to handle session management.
Configure sessions to be stored securely (consider using a database like MongoDB for session storage).

Ensure User Authentication:
Middleware to check if a user is logged in before accessing certain routes (e.g., /profile or admin-only routes).
Redirect or return error if user is not authenticated.

Persistent Login:
Use cookies to maintain session across different requests.
Implement session expiration for security.

Tasks:
Install and configure express-session.
Create middleware to check if a user is authenticated.
Set up session expiration and storage.

Add ScreenShots

image

Record

  • I agree to follow this project's Code of Conduct
  • I'm a gssoc-24-extd contributor
  • I want to work on this issue

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.
for more information join our discord https://discord.gg/Jh3bWQ7FRN