Need Help with setting up Authetication #74034
Unanswered
MussadiqKhan
asked this question in
Help
Replies: 1 comment
-
I think your questions are answered here, somewhat: #63775 IN short, solely relying in Middleware, was not a best practice itself, you should check at the access point. Checking in layouts is also not a very good idea! Read through the main post on that discussion and some of the comments where people ask your questions as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I usually use Middleware for verifying users and protect my routes. If token not found in cookie or it is not valid i redirect to login. However, I was planning to use a different approach in my ongoing project. I am using route groups this give me freedom to have one layout file for all protected routes. Is it a good approach to ditch middleware and use my auth checks in layout of protected route? What's your opinion on this?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions