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
Its basically just role based access
Then you just check using a specific middle ware like isPremium where it checks for the property
Managed to add a new field to the session object
sure you also have to make sure to reconcile changes that can occur say a subscription expired etc