Skip to content

feat: add middleware-based route protection#112

Merged
Shriii19 merged 1 commit into
Shriii19:masterfrom
ash1shkumar:feat/middleware-route-protection
May 25, 2026
Merged

feat: add middleware-based route protection#112
Shriii19 merged 1 commit into
Shriii19:masterfrom
ash1shkumar:feat/middleware-route-protection

Conversation

@ash1shkumar
Copy link
Copy Markdown
Contributor

@ash1shkumar ash1shkumar commented May 25, 2026

Related Issue

Closes #107

Description

Implemented centralized middleware-based route protection for authenticated pages.

Added authentication checks before rendering protected routes to prevent unauthorized direct access.

Changes Made

  • Added frontend/middleware.ts
  • Protected:
    • /dashboard
    • /projects
    • /workspace
    • /chat
    • /insights
  • Added centralized auth verification
  • Redirect unauthorized users to /login

Security Improvements

  • Prevents unauthorized route access before rendering
  • Reduces dependency on frontend-only redirects
  • Improves authentication architecture

Type of Change

  • Security Enhancement
  • Middleware Protection
  • Backend/Auth Improvement

Programs

Contributing under:

  • GSSoC
  • NSoC

Level 3 / Advanced

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

@ash1shkumar is attempting to deploy a commit to the shreemp194-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

👋 Thank you for opening this pull request! I will review your changes and assist you soon.

@ash1shkumar
Copy link
Copy Markdown
Contributor Author

@Shriii19 Please review this PR when possible. Since this implementation involves backend/security-focused improvements and production-level handling, could you please update the label from Level 2 to Level 3 / Advanced? Thanks!

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flow-forge Ready Ready Preview, Comment May 25, 2026 3:15pm

@Shriii19 Shriii19 merged commit 95aeb9e into Shriii19:master May 25, 2026
8 checks passed
@ash1shkumar
Copy link
Copy Markdown
Contributor Author

@Shriii19 Thanks! Could you also add the Level3 label to this PR please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NSoC] Add Middleware-Based Route Protection for Protected Pages

2 participants