Skip to content

samuelail/Unbreached

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is Unbreached?

Unbreached is a small package to check if your users are signing up for your service with compromized credentials ( email and password)

Installation

npm i unbreached --save

Usage

const unbreached = require('unbreached');

/** This only checks the email address to see if has been breached.
Note : Not sending an email will automatically result in false **/
async function checkEmail() {

    const email = 'example@example.com';

    const isBreached = await unbreached.checkEmailPassword(email)
    console.log(isBreached)   // True or False
    if (isBreached === true) {
        // Prevent them from doing whatever 
    } else {
        // Allow them to do whatever
    }

}

/** This checks both the email and password. If no matching pair is found,
* It will result in false . Note: Not sending both an email and password will automatically result in false **/
async function checkEmailandPassword() {

    const email = 'example@example.com';
    const password = 'examplepassword';

    const isBreached = await unbreached.checkEmailPassword(email, password)
    console.log(isBreached)   // True or False
    if (isBreached === true) {
        // Prevent them from doing whatever 
    } else {
        // Allow them to do whatever
    }

}

About

A handy node js package to check if your email address and password has been compromised.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published