mullerking-fyda-auth
v1.0.1
Published
A package for Fyda authentication.
Downloads
6
Readme
Fyda Authentication Package
A simple npm package for Fyda authentication.
Installation
npm install npm i muller-fyda-auth
# USAGE
import { sendOTP, validateOTP } from 'npm i muller-fyda-auth';
// Send OTP
sendOTP('YOUR-FYDA-FCN-NUMBER')
.then((token) => {
console.log('OTP sent successfully. Token:', token);
})
.catch((error) => {
console.error('Error:', error.message);
});
// Validate OTP
validateOTP('your-token', 'YOUR-OTP', 'YOUR-FYDA-FCN-NUMBER')
.then((userData) => {
console.log('OTP validated successfully. User Data:', userData);
})
.catch((error) => {
console.error('Error:', error.message);
});