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 = {
tokenOne: string;
tokenTwo: string;
tokenOneExpires: string;
tokenTwoExpires: string;
};
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT