UNPKG

react-native-nitro-totp

Version:

React Native module for TOTP (Time-based One-Time Password) and HOTP (HMAC-based One-Time Password) authentication.

18 lines (16 loc) 485 B
import type { HybridObject } from 'react-native-nitro-modules' import type { NitroTotpGenerateOptions, NitroTotpValidateOptions, OTPAuthURLOptions, } from '../types' export interface NitroTotp extends HybridObject<{ ios: 'c++'; android: 'c++' }> { generate(secret: string, options?: NitroTotpGenerateOptions): string validate( secret: string, otp: string, options?: NitroTotpValidateOptions ): boolean generateAuthURL(options: OTPAuthURLOptions): string }