Louie™
BABetter Auth
•Created by Louie™ on 4/12/2025 in #help
Trouble creating session after login with 2fa enabled
again i appreciate your help, been struggling to get this to work for a couple days now
9 replies
BABetter Auth
•Created by Louie™ on 4/12/2025 in #help
Trouble creating session after login with 2fa enabled
thank you, should i be verifying this in middleware? or on the page itself?
9 replies
BABetter Auth
•Created by Louie™ on 4/12/2025 in #help
Trouble creating session after login with 2fa enabled
Got it — thanks.
Just to clarify: if the session doesn’t exist until after 2FA is verified, how should I authenticate the user enough to allow them access to /verify-2fa, assuming that route is protected?
Should I be creating a temporary session manually after verifying credentials so the user can reach /verify-2fa and complete the second factor?
I want to avoid unauthenticated users accessing /verify-2fa, but also need something in place to authorize the user between login and verification. What’s the recommended approach for this?
9 replies