- Registration flows - Auto-enroll users with verified email/SMS during signup
- Admin operations - Remove compromised or outdated authenticators
- Account migrations - Transfer existing verified contact methods to Authsignal
- Bulk operations - Manage authenticators for multiple users programmatically
Use with caution: Programmatic management bypasses normal user verification flows. Only use these methods when you’ve already verified user contact information in your own system.
Adding authenticators
When to use programmatic enrollment
Programmatic enrollment is ideal when:- You’ve already verified a user’s email/phone in your registration flow
- You’re migrating users from another authentication system
- You want to streamline onboarding by pre-enrolling verified methods
Supported methods
You can programmatically enroll the following verification methods:Method | Required Field | Description |
---|---|---|
EMAIL_OTP | email | Email-based one-time passwords |
EMAIL_MAGIC_LINK | email | Email magic links |
SMS | phoneNumber | SMS-based one-time passwords |
Implementation
This method assumes the user’s contact information has already been verified in your system. Never enroll unverified email addresses or phone numbers.
Removing authenticators
When to use programmatic removal
Administrative removal is appropriate for:- Security incidents - Remove compromised authenticators immediately
- User support - Help users who’ve lost access to their methods
- Account cleanup - Remove outdated or duplicate authenticators
- Compliance - Ensure users only have approved authentication methods
Implementation
userAuthenticatorId
. Get this via:
Account lockout risk: Removing all of a user’s authenticators will prevent them from completing authentication challenges. Always ensure users have at least one working authenticator or a way to re-enroll.