The LoginPasswordlessEmailCode class implements the login-passwordless-email-code screen functionality. This screen collects the user’s email and code.
This method retrieves the array of transaction errors from the context, or an empty array if none exist. An array of error objects from the transaction context.
This methods resends the code to the user’s email address.
Example
Report incorrect code
Copy
Ask AI
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';const loginPasswordlessEmailCode = new LoginPasswordlessEmailCode();loginPasswordlessEmailCode.resendCode();
This method creates a resend control manager for handling email code resend operations. A ResendControl object with resend functionality and state management
Example
Report incorrect code
Copy
Ask AI
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';const loginPasswordlessEmailCode = new LoginPasswordlessEmailCode();const { startResend } = loginPasswordlessEmailCode.resendManager({ timeoutSeconds: 60, onStatusChange: (remainingSeconds, isDisabled) => { console.log(`Resend available in ${remainingSeconds}s, disabled: ${isDisabled}`); }, onTimeout: () => { console.log('Resend is now available'); }});// Call startResend when user clicks resend buttonstartResend();
This method continues the login process using email and code.
Example
Report incorrect code
Copy
Ask AI
//Creates an instance of LoginPasswordlessEmailCode and calls the method with sample data.import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';//Method to continue the login process using email and code.const loginPasswordlessEmailCode = new LoginPasswordlessEmailCode();loginPasswordlessEmailCode.submitCode({ email: "test@domain.com"; code: "<string>";});