RPA.MFA is a library intended mainly for generating one-time passwords (OTP) and not only, as OAuth2 support was introduced lately.
Library requires at the minimum rpaframework version 19.4.0.
In the below example the mfa secret we are reading from the Robocorp Vault is the passcode generated by the Authenticator service. The passcode value is stored into the Vault with key otpsecret.
Passcode is typically a long string (16-32 characters), which is provided in a form of QR image, but it can be obtained by requesting access to a string.
Note that same code can be used to add a mobile phone as a duplicate authentication device at the same time when the same code is added into the Vault.
Robot framework example usage:
Python example usage
Initialize self. See help(type(self)) for accurate signature.