Protected Routes

How do you create your Protected Routes? I've seen a lot of suggestions to use middleware, but for that, I need a JWT, and I use server cookies (which is probably safer - or should I rush the JWT?) However, I am not talking about the fact that the user is redirected from the protected page if he/she is not logged in. I mean, I need more advanced filtering. For example, if the user is over 18, he can enter a given website, if not, it will redirect him to another. Or whether the user has a confirmed email address, that sort of thing. So far I've created a wrapper <Auth> (picture) but I don't know if it's a good approach
3 Replies
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Tolek Bajer
Tolek BajerOP•2y ago
Im not using JWT 🙂
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server