1.0.1 • Published 2 years ago

react-native-freeotp v1.0.1

Weekly downloads
274
License
MIT
Repository
github
Last release
2 years ago

react-native-freeotp

Native module for generating the same TOTP tokens as FreeOTP from your React Native app.

Installation

npm install react-native-freeotp

Android

Rebuild the app.

iOS

Install the pod, then rebuild the app.

npx pod-install

Usage

import FreeOtp from 'react-native-freeotp';

const tokenPair = await FreeOtp.getTokenPair(totpUrl);

Types

Result:

type TokenPair = {
  /**
   * Current token.
   */
  tokenOne: string;
  /**
   * Next period step token.
   */
  tokenTwo: string;
  /**
   * Seconds until expiry of the current token.
   */
  tokenOneExpires: string;
  /**
   * Seconds until expiry of the next token.
   */
  tokenTwoExpires: string;
};

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

1.0.1

2 years ago

1.0.0

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago