A wrapper for the unpass.me API. You will need to register for a Public Key.
npm install passwordless-js
yarn add passwordless-js
import { Passwordless } from "passwordless-js";
const passwordless = new Passwordless(your_public_key);
await passwordless.registerDevice(user_email);
When a user wants to access your website later from a different device, they will need to register that new device again.
const loginData = await passwordless.loginBegin(user_email);
The loginBegin
method returns an object which our server uses to verify and authenticate the user. You will need to send that object to your own server, where you may then use passwordless-node
along with your private key to authenticate the user.