Socket
Socket
Sign inDemoInstall

react-native-freeotp

Package Overview
Dependencies
514
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-freeotp

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


Version published
Weekly downloads
5
increased by25%
Maintainers
1
Install size
133 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 27 Sep 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc