VinnyXL(EU)
VinnyXL(EU)
TTCTheo's Typesafe Cult
Created by Lr-Projects on 1/5/2025 in #questions
How to store/design dynamic roles in jwt
If youre going to use sensitive data, like permissions, in a jwt, wouldnt it be better if you encrypted it , to keep it stateless? JWE works great in ym experience implementing it myself.
17 replies
TTCTheo's Typesafe Cult
Created by Arjuna Admin on 12/13/2024 in #questions
Protect client side routes in app created using t3, I am using Discord provider for auth.
In second thought, middleware runs on edge so its not going to cover client-side routing and authorization, which are not recommended anyway, those should happen server-side only. You should use an auth provider and auth guard to handle authorization. Theres a great answer here: https://stackoverflow.com/questions/67560587/how-to-protect-routes-in-next-js-next-auth You can find examples for auth provider and guard code pretty easily. gl
3 replies
TTCTheo's Typesafe Cult
Created by Arjuna Admin on 12/13/2024 in #questions
Protect client side routes in app created using t3, I am using Discord provider for auth.
Can you share you middleware code? Did you assign a matcher?
3 replies