Skip to content

otplib API Documentation / @otplib/uri / generateTOTP

Function: generateTOTP()

generateTOTP(options): string

Defined in: packages/uri/src/generate.ts:149

Generate a TOTP otpauth:// URI with simplified parameters

Parameters

options

URIOptions & object & object

TOTP URI generation options

Returns

string

The otpauth:// URI string

Throws

If a non-empty algorithm is not supported

Released under the MIT License.