npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@eid-easy/eideasy-js-sdk

v0.13.0

Published

eID Easy SDK provides you with a simple set of methods for getting the user's identity

Downloads

34

Readme

Important !!

This package is in active development and not production ready.

eID Easy js SDk

eideasy-js-sdk provides you with a simple set of functions to get the user's identity.

Installing

Using jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/@eid-easy/[email protected]/dist/eideasy-js-sdk.min.js"></script>

Example

Create the authenticator instance:

var authenticator = window.eidEasySdk.createAuthenticator({
  countryCode: 'EE',
  sandbox: true,
  clientId: '2IaeiZXbcKzlP1KvjZH9ghty2IJKM8Lg',
  localApiEndpoints: {
    identityStart: 'http://eid-sample-app.test/api/identity/start',
    identityFinish: 'http://eid-sample-app.test/api/identity/finish',
  },
  language: 'et',
});

Authenticator Settings

Option | Type | Default | Description ------ | ---- | ------- | ----------- countryCode | string | undefined | ISO 3166-1 alpha-2 country code sandbox | boolean | false | Whether to use the sandbox mode. clientId | string | undefined | get from id.eideasy.com after signing up. localApiEndpoints.identityStart | string | undefined | Your local API endpoint for the identity start request. localApiEndpoints.identityFinish | string | undefined | Your local API endpoint for the identity finish request. language | string | undefined | Two letter ISO 639-1 language code.

Authenticate with an ID Card:

authenticator.idCard.authenticate({
  fail: (result) => {
    // do something with the result
  },
  success: (result) => {
    // do something with the result
  },
  finished: (result) => {
    // do something with the result
  },
});

idCard authentication settings

Option | Type | Default | Description ------ | ---- | ------- | ----------- fail | function | undefined | This function gets called when the authentication process failed. success | function | undefined | This function gets called when the authentication process succeeds. finished | function | undefined | This function gets called when the authentication process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.

Authenticate with Smart-ID:

authenticator.smartId.authenticate({
  idcode: '10101010005',
  countryCode: 'EE',
  started: (result) => {
    // do something with the result
    // e.g. display the result.response.data.challenge code
  },
  fail: (result) => {
    // do something with the result
  },
  success: (result) => {
    // do something with the result
  },
  finished: (result) => {
    // do something with the result
  },
});

smartId authentication settings

Option | Type | Default | Description ------ | ---- | ------- | ----------- idcode | string | undefined | End user's personal identification code countryCode | string | the value set during the authenticator initialization | ISO 3166-1 alpha-2 country code started | function | undefined | This function gets called when the authentication process has started. The argument object of this function contains the challenge (response.data.challenge) you can display to the end-user. fail | function | undefined | This function gets called when the authentication process failed. success | function | undefined | This function gets called when the authentication process succeeds. finished | function | undefined | This function gets called when the authentication process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.

Authenticate with Mobile ID:

authenticator.mobileId.authenticate({
  idcode: '60001019906',
  phone: '+37200000766',
  countryCode: 'EE',
  started: (result) => {
    // do something with the result
    // e.g. display the result.response.data.challenge code
  },
  fail: (result) => {
    // do something with the result
  },
  success: (result) => {
    // do something with the result
  },
  finished: (result) => {
    // do something with the result
  },
});

mobileId authentication settings

Option | Type | Default | Description ------ | ---- | ------- | ----------- idcode | string | undefined | End user's personal identification code phone | string | undefined | End user's phone number, must have the country code prefixed with a '+' sign, e.g. +37200000766 countryCode | string | the value set during the authenticator initialization | ISO 3166-1 alpha-2 country code started | function | undefined | This function gets called when the authentication process has started. The argument object of this function contains the challenge (response.data.challenge) you can display to the end-user. fail | function | undefined | This function gets called when the authentication process failed. success | function | undefined | This function gets called when the authentication process succeeds. finished | function | undefined | This function gets called when the authentication process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.

Development notes

https://github.com/volta-cli/volta/issues/651

volta install [email protected] yarn set version berry

https://yarnpkg.com/cli/run yarn run --inspect-brk webpack