This library allows you to fast & without complexity add passwordless sign in (using fido2/webauthn) to your web application.
Read the paswordless documentation
This is what you need to do:
- Read the docs
- You add our client side library and call the function
passwordless.register
orpasswordless.signin
- You add two very simple endpoints on your backend that integrates to your existing user system (set cookie, sessions, etc) (and communicates secrets with our API).
- You make a request between your clientside code and the verification endpoints on your backend to verify the registration or sign in.
To get started, add the library to your website (either as ES6 module or global):
NPM package:
yarn add @passwordlessdev/passwordless-client
import { Client } from '@passwordlessdev/passwordless-client';
Normal script tag:
<script src="https://cdn.passwordless.dev/dist/0.3.0/passwordless.iife.min.js" crossorigin="anonymous"></script>
<script>
var p = new Passwordless.Client({});
</script>
ES6 module script-tag:
<script src="https://cdn.passwordless.dev/dist/0.3.0/passwordless.min.mjs" crossorigin="anonymous"></script>
ES6 module:
import { Client } from "https://cdn.passwordless.dev/dist/0.3.0/passwordless.min.mjs"
UMD module:
https://cdn.passwordless.dev/dist/0.3.0/passwordless.umd.min.js
Run yarn build