README
Pwned Password Component
Web component built with Stencil that utilizes native form validation to prevent the use of passwords found in previous data breaches via Have I Been Pwned API
Only the first 5 characters of the SHA-1 hash are sent to Have I Been Pwned.
Using the Pwned Password component on your site
Simply place this script tag <script src="https://unpkg.com/pwned-password@0.0.1/dist/pwned-password.js"></script>
in the <head>
of your website.
Usage
Basic
<pwned-password
input-name="password"
input-id="password"
input-class="form-control"
input-placeholder="Enter your password" />
Custom error message
$COUNT
will be replaced with the number of times the password has been found.
<pwned-password
error-message="Custom error message - password found $COUNT times"
input-name="password"
input-id="password"
input-class="form-control"
input-placeholder="Enter your password" />