VinnyXL(EU)
VinnyXL(EU)
Explore posts from servers
BABetter Auth
Created by VinnyXL(EU) on 3/6/2025 in #help
2fa and oscial provider
Got it! Thanks man!
4 replies
BABetter Auth
Created by VinnyXL(EU) on 2/25/2025 in #help
Session cookie not being set upon signup
When calling the auth.api on the server we need to pass the damn headers 🤦
const data = await auth.api.enableTwoFactor({
body: { password: input.password },
headers: await headers(),
});
const data = await auth.api.enableTwoFactor({
body: { password: input.password },
headers: await headers(),
});
4 replies
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