0.9.10 β€’ Published 2 months ago

@nopwdio/sdk-js v0.9.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Nopwd javascript sdk

To all who come here... welcome!

This is the repo for our javascript sdk. This repo contains all the source code we use to build our js library.

What is it?

Nopwd is a set of web components and API to authenticate your users using email link or Passkeys authentication.

Nopwd is still in beta. API and components may change and not production ready at this time.

Check out our demo website to see it live :)

Why?

Authentication is used to be hard for users but also for developers. At Nopwd, we work hard to keep our API simple and minimal πŸ’†. Using Nopwd, you won’t have to:

  • give us money (but you can still support us πŸ˜…)
  • register your app or website
  • manage any API Key or secrets

How to install it?

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

using CDN

<!-- to import the login with magiclink or Passkeys input element -->
<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@nopwdio/sdk-js@latest/cdn/components/np-login.js"
></script>

<!-- to import the logout button element -->
<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@nopwdio/sdk-js@latest/cdn/components/np-logout.js"
></script>

<!-- to import the passkey registration button element -->
<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@nopwdio/sdk-js@latest/cdn/components/np-passkey-register.js"
></script>

using NPM

npm i @nopwdio/sdk-js@latest

and then:

// to import the login with magiclink or Passkeys input element
import "@nopwdio/sdk-js/dist/components/np-login.js";

// to import the logout button element
import "@nopwdio/sdk-js/dist/components/np-logout.js";

// to import the passkeys registration button element
import "@nopwdio/sdk-js/dist/components/np-passkey-register.js";

How to add magic-link or Passkeys authentication?

<np-login></np-login>

<script>
  const input = document.querySelector("np-login");

  input.addEventListner("np:login", (e) => {
    // Your are authenticated πŸŽ‰
    const { expires_at, token } = e.target.getSession();
  });
</script>

How to logout?

<np-logout></np-logout>

<script>
  const button = document.querySelector("np-logout");

  input.addEventListner("np:logout", (e) => {
    // Your are logged out πŸŽ‰
  });
</script>

How to create a Passkey?

<np-passkey-register></np-passkey-register>

<script>
  const button = document.querySelector("np-passkey-register");

  button.addEventListner("np:register", (e) => {
    // The passkey has been created πŸŽ‰
  });
</script>

New contributors welcome!

You can create a new Issue puts a problem on our radar or a pull request!

What's next?

Read the full documentation

0.9.8

2 months ago

0.9.7

2 months ago

0.9.9

2 months ago

0.9.10

2 months ago

0.9.6

2 months ago

0.9.0

3 months ago

0.9.2

3 months ago

0.7.4

3 months ago

0.9.1

3 months ago

0.9.4

2 months ago

0.9.3

2 months ago

0.9.5

2 months ago

0.8.1

3 months ago

0.8.0

3 months ago

0.7.3

3 months ago

0.7.2

3 months ago

0.7.1

3 months ago

0.7.0

3 months ago

0.6.3

3 months ago

0.6.2

3 months ago

0.6.1

3 months ago

0.6.0

3 months ago

0.5.16

5 months ago

0.5.14

6 months ago

0.5.15

5 months ago

0.5.13

6 months ago

0.5.12

7 months ago

0.5.11

9 months ago

0.5.10

9 months ago

0.5.9

10 months ago

0.5.8

10 months ago

0.5.7

10 months ago

0.5.6

10 months ago

0.5.5

10 months ago

0.5.4

10 months ago

0.4.37

10 months ago

0.4.36

10 months ago

0.5.3

10 months ago

0.5.0

10 months ago

0.5.2

10 months ago

0.5.1

10 months ago

0.4.35

11 months ago

0.4.31

11 months ago

0.4.32

11 months ago

0.4.30

11 months ago

0.4.33

11 months ago

0.4.34

11 months ago

0.4.28

11 months ago

0.4.29

11 months ago

0.4.26

11 months ago

0.4.27

11 months ago

0.4.24

11 months ago

0.4.25

11 months ago

0.4.23

11 months ago

0.4.20

11 months ago

0.4.21

11 months ago

0.4.22

11 months ago

0.4.19

11 months ago

0.4.17

11 months ago

0.4.18

11 months ago

0.4.15

11 months ago

0.4.16

11 months ago

0.4.14

11 months ago

0.4.13

11 months ago

0.4.11

11 months ago

0.4.12

11 months ago

0.4.10

11 months ago

0.4.9

11 months ago

0.4.8

12 months ago

0.4.7

12 months ago

0.4.6

12 months ago

0.4.5

12 months ago

0.4.4

12 months ago

0.4.3

12 months ago

0.3.9

1 year ago

0.3.8

1 year ago

0.4.0

1 year ago

0.3.7

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.0

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago