react-native-nitro-totp
Version:
React Native module for TOTP (Time-based One-Time Password) and HOTP (HMAC-based One-Time Password) authentication.
11 lines (10 loc) • 479 B
TypeScript
import type { HybridObject } from 'react-native-nitro-modules';
import type { NitroHOTPGenerateOptions, NitroHOTPValidateOptions, OTPAuthURLOptions } from '../types';
export interface NitroHOTP extends HybridObject<{
ios: 'c++';
android: 'c++';
}> {
generate(secret: string, options?: NitroHOTPGenerateOptions): string;
validate(secret: string, otp: string, options?: NitroHOTPValidateOptions): boolean;
generateAuthURL(options: OTPAuthURLOptions): string;
}