Socket
Socket
Sign inDemoInstall

@nuts-foundation/auth

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuts-foundation/auth - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

dist/index.js

25

package.json
{
"name": "@nuts-foundation/auth",
"version": "0.1.1",
"description": "Lib to connect your frontend to the nuts-auth.",
"version": "0.2.0",
"description": "Lib to connect your frontend to nuts-auth.",
"repository": "nuts-foundation/nuts-auth-js",
"main": "index.js",
"main": "dist/index.js",
"license": "LGPL-3.0",
"scripts": {
"build": "webpack --mode production"
},
"keywords": [

@@ -12,3 +16,16 @@ "nuts",

"authentication"
]
],
"files": [
"dist/index.js"
],
"sideEffects": false,
"devDependencies": {
"@babel/core": "^7.5.5",
"babel-loader": "^8.0.6",
"webpack": "^4.39.2",
"webpack-cli": "^3.3.6"
},
"dependencies": {
"qrcode": "^1.4.1"
}
}

31

README.md

@@ -7,11 +7,16 @@ # @nuts-foundation/auth

It connects to the auth server, polls for status, updates the UI and forwards the user to a given URL at success.
The library helps you with the following:
* Connections to the nuts-node
* Creating login sessions
* Polling for IRMA session status
* Updating the UI on session changes
* Forwarding the user to specific location after successful login
* Gracefully handling browser reload during login sessions
## Install
From CDN:
```html
<script src="https://cdn.jsdelivr.net/npm/@nuts-foundation/auth/index.min.js"></script>
```
$ npm add @nuts-foundation/auth
```

@@ -21,8 +26,5 @@ ## Style guide

Combine it with the NUTS style guide and get the frontend for free!
https://github.com/nuts-foundation/irma-web-frontend
## Dependencies
This library depends on the [qrcodejs package from davidshumjs](https://davidshimjs.github.io/qrcodejs/)
## Usage

@@ -33,8 +35,5 @@

<link rel="stylesheet" href="//nuts-foundation.github.io/irma-web-frontend/application.css" />
<!--A lib to render qr-codes -->
<script src="https://cdn.jsdelivr.net/gh/davidshimjs/qrcodejs@gh-pages/qrcode.min.js"></script>
<!--The nuts auth js lib -->
<script src="https://cdn.jsdelivr.net/npm/@nuts-foundation/auth@0.1.0/index.min.js"></script>
<!--The nuts auth js lib. Note: include path depends on your dev stack-->
<script src="/node_modules/@nuts-foundation/auth/dist/index.min.js"></script>
<section class="nuts-login-form irma-web-form">

@@ -55,3 +54,3 @@ <header class="header">

<section class="centered initialized">
<div id="qrcode"></div>
<canvas id="qrcode"></canvas>
</section>

@@ -83,3 +82,3 @@ <section class="centered waiting-for-user">

```js
nutsLogin = NutsLogin.init({
nutsLogin = nutsAuth.init({
nutsAuthUrl: "http://localhost:1323",

@@ -86,0 +85,0 @@ qrEl: 'qrcode',

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc