Skip to content

otplib API Documentation / @otplib/plugin-base32-alt / bypassAsBase64

Variable: bypassAsBase64

const bypassAsBase64: Base32Plugin

Defined in: plugin-base32-alt/src/index.ts:71

Base64 string bypass - treats secrets as base64-encoded strings

Use this when your secret is a base64 string that should be converted directly to bytes without Base32 encoding.

Example

ts
import { bypassAsBase64 } from '@otplib/plugin-base32-alt';
import { generate } from '@otplib/totp';

await generate({ secret: "SGVsbG8=", base32: bypassAsBase64, crypto });

Released under the MIT License.