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

✨ feat[frontend]: middleware for user verification #106

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

sidarth-23
Copy link
Collaborator

Summary

  • Added jwt verification in middleware to authorize only authenticated users into protected routes
  • Altetered the route structure to simplify setting up middleware and making it maintainable.
  • Fixed the link paths in app to support the new route structure ✨ Update cookieDestroyer to revalidatePath and redirect
  • Update cookieDestroyer function to revalidatePath and redirect to maintain user session better.

Video

https://www.loom.com/share/776a0e4d2b2f41f3b5801618dcc97572?sid=6636e8f3-5eb5-4dc1-8ddd-5ea4bd2b0fcf

  • Tested (Must)
  • Test Case added
  • Build Successful (Must)
  • Sufficient Code comments added (Must)
  • Attached Screenshots / Videos
  • All Relevant Documents added

Depends on

- Added jwt verification in middleware to authorize only authenticated users into protected routes
- Altetered the route structure to simplify setting up middleware and making it maintainable.
- Fixed the link paths in app to support the new route structure
✨ Update cookieDestroyer to revalidatePath and redirect

- Update cookieDestroyer function to revalidatePath and redirect to maintain user
  session better.
apps/admin/middleware.ts Show resolved Hide resolved
@sidarth-23 sidarth-23 requested a review from yaju09 April 9, 2024 09:37
@yogai53 yogai53 merged commit af34f55 into master Apr 9, 2024
4 checks passed
@sidarth-23 sidarth-23 deleted the feat/verify-user-middleware-nextjs branch April 11, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants