Soheel
BABetter Auth
•Created by Soheel on 4/28/2025 in #help
Enabling OTP-Email 2FA Automatically on User Signup
Hello Community,
I'm currently struggling with the 2FA plugin. I would like to enable OTP-Email 2FA automatically when users sign up. However, using
auth.api.enable2FA
does not allow specifying a user.id. Even when using impersonation through the admin API, I have found it impossible to properly enable 2FA from the server side during user creation.
Does anyone have an idea or a workaround for ensuring that the 2FA data is generated and enabled automatically upon user creation?
Thank you in advance for your support!
Best regards,
Soheel3 replies