@random-guys/sp-otp
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

sp-otp

IBS service as a nodejs library

How to install?

yarn add @radom-guys/sp-otp

How does it work?

import { OTPService } from '@random-guys/sp-otp';
import { unsafeClient, unsafeRun } from '@random-guys/lux';

unsafeRun(async () => {
  let client = await unsafeClient(SERVICE_URL)
  let service = new OTPService(client, 1)
  let isCreated = await service.create(phoneNumber)
  // in another function/handler
  if (await service.validate(phoneNumber, otp)) {
    // do something
  }
})

Readme

Keywords

none

Package Sidebar

Install

npm i @random-guys/sp-otp

Weekly Downloads

1

Version

0.0.3

License

ISC

Unpacked Size

223 kB

Total Files

8

Last publish

Collaborators

  • random-guys