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

npm-adinet-2auth

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-adinet-2auth

Modulo de doble autentificacion para aplicaciones sin internas

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Adinet 2Auth

Adinet 2Auth es una libreria de 2 factor para inicio de sesion segura en plataformas internas.

Instalacion

puedes instalarlo desde npm

$ npm install npm-adinet-2auth

o tambien puedes clonar el repositorio

$ git clone https://github.com/chechooxd/Adinet-2Auth.git

Como se usa

Creacion y envio de Codigo

const auth = require('npm-adinet-2auth')

const mailConfig = {
  host: "smtp.example.com",
  port: 587,
  secure: false, // upgrade later with STARTTLS
  auth: {
    user: "username",
    pass: "password",
  },
}

const from = 'example@from.com'

auth.addCode(mailConfig, from, 'userName', 'user@email.com')

Validacion de Codigo

const auth = require('npm-adinet-2auth')

var valid = auth.validateCode('userName', 'code') // return Boolean

Expiracion de Codigo

const auth = require('npm-adinet-2auth')

var CODES = auth.getCode()

const expire = () => {
    for (const {id, time} of CODES) {
        auth.expireCode(id, time)
    }
} 

setTimeout(expire(), 3000);

Licencia

MIT

FAQs

Package last updated on 03 Sep 2021

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