Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Middleware to Protect Routes Requiring Authentication #6

Open
andrew21-mch opened this issue Aug 16, 2024 · 0 comments
Open
Assignees
Labels

Comments

@andrew21-mch
Copy link
Contributor

Create middleware to protect routes that require user authentication. This middleware will ensure that only logged-in users can access specific pages, such as the dashboard and profile edit pages. If a user is not authenticated, they should be redirected to the login page.

Steps to Complete:

Create a PHP middleware function that checks if a user is authenticated by verifying session data.
Apply this middleware to all routes that require authentication.
Redirect unauthenticated users to the login page with an appropriate message.
Acceptance Criteria:

Only authenticated users can access protected routes.
Unauthenticated users are redirected to the login page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants