Two factor authentication is a way of increasing the security of an application by requiring the user to provide more than a simple password (one factor authentication). Two factor authentication utilizes two of the following factors to identify the user:
1. Knowledge - something you know - for example, your password
2. Possession - something you have - for example, your cell phone or access to your email account
3. Inherent - something you are - for example, fingerprints or eye iris
The third factor is out of scope for this particular article We're going to look at adding the second form (possession) to a PowerBuilder application. Specifically, we're What going to use Google Authenticator, an application for mobile devices (and the desktop) that generates time based one time temporary passwords (TOTP) for use with 2FA.
The sample code for this article is available on CodeXchange.