otp
otp(
digits?,options?):string
Defined in: src/token.ts:68
A numeric one-time code. Leading zeros are preserved.
Parameters
Section titled “Parameters”digits?
Section titled “digits?”number = 6
options?
Section titled “options?”TokenOptions = {}
Returns
Section titled “Returns”string
Example
Section titled “Example”otp(); // "047215" six digits, leading zero keptotp(8); // "90114862"