StaticscreenThis method handles switching between DB connection (password) and Passwordless connection (Email/SMS OTP). The connection parameter should be one of: 'email', 'sms', or a DB connection name.
import LoginPassword from "@auth0/auth0-acul-js/login-password";
const loginPasswordManager = new LoginPassword();
// Function to handle connection switching
const handleSwitchConnection = (connectionName: string) => {
loginPasswordManager.switchConnection({ connection: connectionName });
};
// Switch to different connection strategies
handleSwitchConnection('email'); // Switch to email-based authentication
handleSwitchConnection('sms'); // Switch to SMS-based authentication
Example