cordova-plugin-codigocaixa

0.0.8 • Public • Published

CodigoCaixa OTP Cordova

Cordova plugin for OTP depends on BarcodeScanner to be able to easly obtain the secret

Project Info
License: MIT
Build: Cordova Plugin

To install

cordova create <project-name>
cd <project-name>
cordova platform add android
cordova plugin add <location-of-this-plugin>
cordova build

Example

Copy example/* into the www folder of your project and press the OTP button. Initially it will fire up the BarcodeScanner to scan a QR code with an url like otpauth://totp/username?secret=7SPQJZ7CDF7NTKJ2 this secret will be stored and then later used to generate One Time Passwords

Plugin API

var totp = new CodigoCaixa.Totp();
totp.generate(function(result) { /* result is the otp */ });

or seperate methods

 String secret = "B2374TNIQ3HKC446";
 // initialize OTP
 var generator = new CodigoCaixa.Totp(secret);
 // generate token
 generator.generateOTP(function(result) { /* result is the otp */ });

Package Sidebar

Install

npm i cordova-plugin-codigocaixa

Weekly Downloads

1

Version

0.0.8

License

Caixa Economica Federal

Unpacked Size

25.1 kB

Total Files

8

Last publish

Collaborators

  • caius.muniz