1.0.1 • Published 2 years ago

passwordless-js v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Overview

A wrapper for the unpass.me API. You will need to register for a Public Key.

Installing

NPM

npm install passwordless-js

Yarn

yarn add passwordless-js

Usage

Import Library

import { Passwordless } from "passwordless-js";

Create an instance

const passwordless = new Passwordless(your_public_key);

Registering a users device

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.

Authenticating a user

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.

1.0.1

2 years ago

1.0.0

2 years ago