Authentication and Permission Check with Middleware #62765
Unanswered
samirj12
asked this question in
App Router
Replies: 2 comments
-
Middleware can be used in your case as
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi there, I have the same question. Have you solved it? |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, I'm facing a bit of a challenge in my project, and I'd appreciate some guidance.
User Authentication and Session Management: I'm working on implementing user authentication in my project using JWT tokens stored in cookies. My goal is to automatically log out inactive users after 15 minutes of inactivity (including closing the browser tab). This would require them to log in again to regain access.
Permission-Based Access Control: Additionally, I want to control access to specific pages based on user permissions. Unauthorized users wouldn't be able to view such pages.
While I'm unsure about the exact implementation details, I believe middleware could play a key role in achieving this functionality. Could anyone offer some insights or point me towards resources that can help me solve these challenges?
Beta Was this translation helpful? Give feedback.
All reactions