New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@berlinsms/twofa-verify

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@berlinsms/twofa-verify

Verify a phone number by sending an OTP via SMS

latest
npmnpm
Version
1.1.1
Version published
Maintainers
0
Created
Source

@berlinsms/twofa-verify

A js-library to verify a twofa-optin-challenge on serverside

install

npm install @berlinsms/twofa-verify

usage

You need sitekey and secretkey from https://app.berlinsms.de/keygen

To send a code

import { TwofaOptin } from '@berlinsms/twofa-verify';

const twofaOptin = new TwofaOptin( <twofaSecretkey> );
const twofaChallenge = await twofaOptin.postTwofaSendsms( <phonenumber> );

To verify a code

import { TwofaOptin } from '@berlinsms/twofa-verify';

const twofaOptin = new TwofaOptin( <twofaSecretkey> );
const twofaChallenge = await twofaOptin.putTwofaPreverifycode( <challengeToken>, <code> );

To verify a challenge, when previously solved on client side

import { TwofaOptin } from '@berlinsms/twofa-verify';

const twofaOptin = new TwofaOptin( <twofaSecretkey> );
const twofaChallenge = await twofaOptin.getTwofaChallenge( <challengeToken> );

Keywords

twofa

FAQs

Package last updated on 21 Nov 2024

Did you know?

Socket

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