All Projects → toepoke → pAppwords

toepoke / pAppwords

Licence: Unlicense License
Vanilla JS plug-in with zero configuration integrate with HaveIBeenPwned API v2

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to pAppwords

curved-menu
VanillaJS fully configurable curved menu (circular navigation)
Stars: ✭ 30 (+42.86%)
Mutual labels:  vanilla-javascript, vanilla-js
eins-modal
Simple to use modal / alert / dialog / popup. Created with pure JS. No javascript knowledge required! Works on every browser and device! IE9
Stars: ✭ 30 (+42.86%)
Mutual labels:  vanilla-javascript, vanilla-js
coding challenge-14
Understanding JavaScript and coding without the help of a library or tool
Stars: ✭ 22 (+4.76%)
Mutual labels:  vanilla-javascript, vanilla-js
vanillajs-hello
Start a VanillaJS website using WebPack in just 30 seconds: HTML,CSS,Babel,SASS,Bootstrap,Prettier,Gitpod
Stars: ✭ 24 (+14.29%)
Mutual labels:  vanilla-javascript, vanilla-js
periodic-table.io
periodic-table.io
Stars: ✭ 37 (+76.19%)
Mutual labels:  vanilla-javascript, vanilla-js
js-plugin-starter-kit
VanillaJS (pure JavaScript) plugin starter with Webpack 4 and Babel 7.
Stars: ✭ 100 (+376.19%)
Mutual labels:  vanilla-javascript, vanilla-js
spider-covid-19-viz-3d
Speedy access to the latest, local COVID-19 data with a familiar interface: the Globe
Stars: ✭ 19 (-9.52%)
Mutual labels:  vanilla-javascript, vanilla-js
Rallax.js
Dead simple parallax scrolling.
Stars: ✭ 1,441 (+6761.9%)
Mutual labels:  vanilla-javascript, vanilla-js
tablist
WAI-ARIA tab plugin without dependencies.
Stars: ✭ 21 (+0%)
Mutual labels:  vanilla-javascript, vanilla-js
mm-components
Music Markups components
Stars: ✭ 50 (+138.1%)
Mutual labels:  vanilla-javascript, vanilla-js
Bs Custom File Input
A little plugin for Bootstrap 4 custom file input
Stars: ✭ 162 (+671.43%)
Mutual labels:  vanilla-javascript, vanilla-js
vanilla-js-drawer
A dependency-free Vanilla JS drawer. No dependencies, no automation build tools.
Stars: ✭ 20 (-4.76%)
Mutual labels:  vanilla-javascript, vanilla-js
Mailtoui
A simple way to enhance your mailto links with a convenient user interface.
Stars: ✭ 162 (+671.43%)
Mutual labels:  vanilla-javascript, vanilla-js
Leakfa.com
A simple way to know if you are on the list of major security breaches like "HIBP", but it is specific for Iran.
Stars: ✭ 106 (+404.76%)
Mutual labels:  breach, breaches
Vanillajs Deck
A Vanilla.js Single Page App (SPA) slide deck for a presentation about Vanilla.js written with no frameworks.
Stars: ✭ 119 (+466.67%)
Mutual labels:  vanilla-javascript, vanilla-js
tensorflowjs-remove-background
Remove Background from the picture using WebAssembly & TensorFlow.js
Stars: ✭ 79 (+276.19%)
Mutual labels:  vanilla-javascript, vanilla-js
Vanilla Semantic Ui
Semantic UI component framework without jQuery
Stars: ✭ 97 (+361.9%)
Mutual labels:  vanilla-javascript, vanilla-js
Router.js
Router.js is a simple and powerful javascript library to handle routing
Stars: ✭ 107 (+409.52%)
Mutual labels:  vanilla-javascript, vanilla-js
event-driven-web-components-realworld-example-app
Exemplary real world application built with Vanilla JS Web Components in an Event Driven Architecture
Stars: ✭ 55 (+161.9%)
Mutual labels:  vanilla-javascript, vanilla-js
bs-breakpoints
A plugin which detect Bootstrap 4 breakpoints and emit when there is a change
Stars: ✭ 22 (+4.76%)
Mutual labels:  vanilla-javascript, vanilla-js

pAppwords

As responsible website proprietors we want to help and/or educate our users to the risks of poor passwords.

pAppwords is a vanilla js library you can install on your website and it will notify your users if the password they are using has been subject to a breach.

Screenshot of pAppwords telling a user the password they used has been involved in a breach.

The plug-in piggy backs on the fantastic work of @troyhunt and his haveibeenpwned.com website.

Demos

  1. The Auto Demo has zero configuration.
  2. The Validation Demo shows how you can configure how the plug-in behaves.

Why pAppwords?

It's a play on words of app, password and papp* - if your password has been in a breach, it's a bit papp :-)

* - papp noun, British, informal - rubbish.

Installation

There are two ways the plug-in can be installed.

Zero Configuration

Simple. Just install the pAppwords dependencies:

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="pappwords-min.css" />
    ...
  </head>
  <body>
    ...
    <script type="text/javascript" src="pappwords-min.js"></script>
  </body>
</html>

Custom Configuration

Installation of the plug-in dependencies is the same as above. You only need to add your configuration:

document.addEventListener("DOMContentLoaded", function() {
			
  Pappwords.onLoad({
    message: "* Password has been breached {PRETTY-COUNT} times.",
    failurePercentage: 100,
    showDialog: false, 
    onComplete: function(result) {
      // Whatever you want to do :-)

      
      // If the passwords were not subject to a breach, then:
      // true => form should submit
      // false => form should not submit (user handles submission themselves)
      return true;
    }
  });
			
});

The shape of result in the callback can be seen here.

Options

Clear password fields (boolean)

If a password is subject to a breach the password field will be cleared, forcing the user to enter a another password.

Defaults to true.

Warn only (boolean)

If true, the end-user is told their password has been subject to a breach, but the form will still submit.

Default is false.

Failure Percentage (decimal)

See below for details.

Defaults to 33%.

Show Dialog (boolean)

Flags whether the modal warning should be shown or not.

Default is true.

Message (string)

The message the user sees in the breached dialog.

Defaults is the text in the above screenshot.

Compatibility

Tested working with:

  • Chrome
  • Firefox
  • IE Edge
  • IE 10 and 11 (via emulation)

How It Works

Once installed, when a user submits a form with a password, pAppwords will query Troy's API to see if the password has been subject to a breach. If it has the above dialog is shown to the user.

If we think about typical password scenarios in a system, we have:

  1. Login - 1 password
  2. Register - 2 passwords (password and password confirmation)
  3. Change password - 3 passwords (current password, new password and new password confirm)

When the user submits a form with a password field, pAppwords will run a check for pwnage against all password fields in the form.

It then looks at the percentage failure for the passwords in that form. This is set to 33% by default. So ...

  • If the user logins in with a breached password the failure rate is 100% so the warning dialog is shown.
  • If the user changes their password and 1 of the passwords is subject to a breach, the failure rate is 33% so the dialog is shown.
  • If however the user changes their passwords and none of the passwords are subject to a breach, the failure rate is zero and the dialog is not shown.

The above means we can use pAppwords on all pages with passwords without being concerned about the scenario being run.

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].