Protected routing premium user

I want to implement protected routes where a user needs to have a "premium" account to access it. How can i do this? I have implemented normal protected routes using getServerSideProps already
5 Replies
Keef
Keef2y ago
Its basically just role based access
Keef
Keef2y ago
Create T3 App
NextAuth.js 🚀 Create T3 App
The best way to start a full-stack, typesafe Next.js app.
Keef
Keef2y ago
Then you just check using a specific middle ware like isPremium where it checks for the property
Christian Lind
Christian LindOP2y ago
Managed to add a new field to the session object
Keef
Keef2y ago
sure you also have to make sure to reconcile changes that can occur say a subscription expired etc
Want results from more Discord servers?
Add your server