RamakrushnaBiswal / PlayCafe

it a cafe website🚀
https://play-cafe.vercel.app/
MIT License
29 stars 78 forks source link

Feat: Set Up User Session Management #144

Open samar12-rad opened 1 week ago

samar12-rad commented 1 week ago

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

github-actions[bot] commented 1 week ago

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

RamakrushnaBiswal commented 1 week ago

Assigned @samar12-rad