Skip to content

Getting started

Components list

nameTypeDescription
np-logininputAuthenticate a user with a magic-link or passkey
np-passkey-registerbuttonRegister a passkey
np-logoutbuttonRevoke the current session

How to install it?

You can load our web components via CDN or by installing it locally using package manager such as NPM.

If you don’t want to use the CDN, you can install the latest version of our sdk from npm with the following command.

Terminal window
npm i @nopwdio/sdk-js@latest

Once installed, you only have to import the desired component and you are good to go.

import "@nopwdio/sdk-js/dist/components/{component-name}.js";

The difference between CDN and NPM

TL;DR: @nopwdio/sdk-js/cdn is for CDN supporters and @nopwdio/sdk-js/dist for NPM lovers.

You’ll notice that the CDN links all start with /cdn and npm imports use /dist. The /cdn files are pre-bundled, minified. Code splitting is also used for optimal bandwidth optimization. The /dist files DO NOT come pre-bundled, allowing your bundler of choice to more efficiently deduplicate dependencies, resulting in smaller bundles and optimal code sharing.