One-time passwords (OTPs) are an authentication method commonly used as part of two-factor identification (2FA) and multi-factor authentication (MFA) methods. OTPs are unique passwords that are only valid for a single login session for a defined period of time.
OTPs are a string of characters or numbers automatically generated to be used for one single login attempt. OTPs can be sent to the user's phone via SMS, Voice, or Push message and can be used to protect web-based services, private credentials, and data.
How to handle two-factor authentication in Leapwork:
1. Disabling the 2FA for the test environment or adding the application to your list of trusted sites(if it is a website).
If 2FA is token or smartcard-based, try using Wait Block
which will halt the execution for a period of time, giving the user time to enter the PIN manually.
3. If the 2FA mechanism has a windows app for authentication purposes, the user can download it in the machine where Leapwork is installed and then automate it, just like any other windows program automation. OTP-based MFA can be handled in the same way.
4. If 2FA is received in an email, you can add an automation to fetch the OTP values from the email using web blocks.