VinnyXL(EU)
Explore posts from serversBABetter Auth
•Created by VinnyXL(EU) on 3/6/2025 in #help
2fa and oscial provider
Since social providers do not return a password when signing up through them but i want to enable 2fa for all users by default, but in order to enable the user has to enter a password which is set to null in the db for people who use google, im going to use google as the only oidc provider and email+pw+2fa for the rest.
So how can i enable 2fa without a password?
I would rather not start creating random passwords since they are encrypted and would not be retreivable unless i encrypt them myself and decrypt at use, since i need the actual password and not the hash...
anyway, any ideas anyone???
Thanks! 🤦
4 replies
BABetter Auth
•Created by VinnyXL(EU) on 2/25/2025 in #help
Session cookie not being set upon signup
I am using the email & password provider, I have a sign up process that includes verifying the email and adding 2fa by default through totp or an authernticator app.
At first I call the email.singup method I get the created user data back
The next step is to verify the email which works, an email is sent and the verification link works and the user table is updated.
The next step is to enable 2fa and add an authenticator app, but when I call the enable function with the user's password I get a 401 back
Im using next.js and trpc.
I have set the autoSignInAfterVerification to true, which helped with getting actual session cookies assigned, but I am still getting 401 back 🤦♂️
What am I doing wrong?
4 replies
TTCTheo's Typesafe Cult
•Created by VinnyXL(EU) on 12/3/2023 in #questions
Help setting up next-auth
Im new to T3, just started my first project and im trying to setup google as an auth provider, I have registered an app with google and added the correct domain and redirect uri to it.
I also added the google provider credentials to the T3 app and the env vars to the env.js file.
I already deployed the app to vercel, so I added that domain to google and discord.
When I try to sign in it displays my google accounts and takes me to the discord authorization screen, but when I choose an account or click Authorize it just returns to the sign in page and says: Try using a different acount.
I tried to look for tutorials but they're old and outdated, it seems like things have changed in the stack since those were filmed.
Any help would be appreciated. Thanks!
2 replies