UNPKG

@akanass/rx-otp

Version:

HMAC-based (HOTP) and Time-based (TOTP) One-Time Password manager. Works with Google Authenticator for Two-Factor Authentication.

7 lines (6 loc) 365 B
import { Observable } from 'rxjs'; import { OTPVerifyResult, TOTPGenerateOptions, TOTPVerifyOptions } from '../schemas/interfaces'; export declare class TOTP { static generate: (key: string, options?: TOTPGenerateOptions) => Observable<string>; static verify: (token: string, key: string, options?: TOTPVerifyOptions) => Observable<OTPVerifyResult | {}>; }