Totp
The TOTP module can be used to generate one-time passcodes as specified in RFC6238. It uses the same algorithm as Google Authenticator etc so it should be compatible with the codes generated there. It is meant for cases such as using Manatee to log into 2FA-enabled sites, or into a remote-access tool that requires a one-time passcode.
An example is given below;
js
// Load and instantiate the module
var totp = Module.load("Totp", { version: "v2.0.0" });
// You use the code given in the 2FA signup (where the QR code is also normally shown)
var passcode = totp.generate("G3PV4MGQ74S4NRWWBHCCFDS572ACXOC4");where G3PV4MGQ74S4NRWWBHCCFDS572ACXOC4 is the secret code given when you sign up for 2FA auth. This needs to be stored somewhere, e.g. directly in the flow or maybe encrypted in a Table and then used each time you need to generate a new passcode for login.
