Socket
Socket
Sign inDemoInstall

@edgeworkscreative/pwned-password

Package Overview
Dependencies
1
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @edgeworkscreative/pwned-password

Web component built with Stencil that utilizes the Have I Been Pwned API to prevent the use of passwords found in previous data breaches.


Version published
Maintainers
2
Install size
798 kB
Created

Changelog

Source

<small>1.0.1 (2018-10-12)</small>

  • add demo link to readme (e5228ab)
  • Fix unpkg url in readme (92c2509)

Readme

Source

Built With Stencil

Pwned Password Component

Web component built with Stencil that utilizes the Have I Been Pwned API to prevent the use of passwords found in previous data breaches.

Only the first 5 characters of the SHA-1 hash are sent to Have I Been Pwned.

DEMO

Using the Pwned Password component on your site

Simply place this script tag in the <head> of your website:

<script src="https://unpkg.com/@edgeworkscreative/pwned-password@latest/dist/pwned-password.js"></script>

Now you can use the component anywhere in the body of your site:

<pwned-password name="password" placeholder="Enter your password"></pwned-password>
document.addEventListener('pwnedPasswordFound', (e) => {
  if (e.detail === 0) {
    let password =  e.srcElement.querySelector('input').value;
    console.log('Password hasn\'t been pwned - submit your form');
  } else {
    alert(`Password has been pwned ${e.detail} times!`);
  }
})

FAQs

Last updated on 12 Oct 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc