session middleware? #11605
Unanswered
bibblebabl
asked this question in
Help
session middleware?
#11605
Replies: 1 comment 2 replies
-
Here is more advanced solution: we have 2 types of session (guest and authenticated) #11319 (comment). But in general, you just need to get session from |
Beta Was this translation helpful? Give feedback.
2 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 everyone,
I'm working on a feature to check users' subscription status and expiration date to ensure that only those with an active plan can access the system. I want to prevent access to auth pages if the subscription isn't valid, but I'm unsure about the best approach to implement this.
Storing the expiration date in the JWT doesn't seem secure since it can be manipulated, and making fetch calls in middleware.ts feels like it's not the right place either.
If anyone has experience with this or can suggest a more elegant solution, I'd really appreciate your help!
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions