# @duosecurity/duo_web

> Duo two-factor authentication for Node.js web applications

Latest version **1.0.6** (published 2021-11-17) · BSD-3-Clause license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @duosecurity/duo_web
pnpm add @duosecurity/duo_web
yarn add @duosecurity/duo_web
bun add @duosecurity/duo_web
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2021-11-17 |
| First published | 2018-07-12 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | separate (@types/duosecurity__duo_web) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 41.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 46 |
| Maintainers | duo_security, matts_duosec, duokristina |
| Keywords | Duo Security, Two-Factor Authentication |

## Links

- npm: https://www.npmjs.com/package/@duosecurity/duo_web
- Repository: https://github.com/duosecurity/duo_nodejs
- Homepage: https://www.duosecurity.com/docs/duoweb
- Issues: https://github.com/duosecurity/duo_nodejs/issues
- npm.io page: https://npm.io/package/@duosecurity/duo_web

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2021-11-17
- 1.0.5 — 2020-01-09
- 1.0.4 — 2018-07-12

## README

# Overview

[![Build Status](https://github.com/duosecurity/duo_nodejs/workflows/Node%20CI/badge.svg)](https://github.com/duosecurity/duo_nodejs/actions)
[![Issues](https://img.shields.io/github/issues/duosecurity/duo_nodejs)](https://github.com/duosecurity/duo_nodejs/issues)
[![Forks](https://img.shields.io/github/forks/duosecurity/duo_nodejs)](https://github.com/duosecurity/duo_nodejs/network/members)
[![Stars](https://img.shields.io/github/stars/duosecurity/duo_nodejs)](https://github.com/duosecurity/duo_nodejs/stargazers)
[![License](https://img.shields.io/badge/License-View%20License-orange)](https://github.com/duosecurity/duo_nodejs/blob/master/LICENSE)

**duo_nodejs** - Duo two-factor authentication for Node.js web applications: https://duo.com/docs/duoweb-v2

This package allows a web developer to quickly add Duo's interactive, self-service, two-factor authentication to any web login form - without setting up secondary user accounts, directory synchronization, servers, or hardware.

Files located in the `js` directory should be hosted by your webserver for inclusion in web pages.

# Installing

Development:

```
$ git clone https://github.com/duosecurity/duo_nodejs.git
$ cd duo_nodejs
$ npm install
```

System:

```
$ npm install --global @duosecurity/duo_web
```

Or run the following to add to your project:

```
$ npm install --save @duosecurity/duo_web
```

# Using

```
$ node --interactive
> const duo_web = require('@duosecurity/duo_web');
> duo_web.sign_request(ikey, skey, akey, username);
'TX|...TX_SIGNATURE...==|...TX_HASH...:APP|...APP_SIGNATURE...==|...APP_HASH...'
```

# Test

```
$ npm run test
...
OK: 13 assertions (42ms)
```

# Lint

```
$ npm run lint

> @duosecurity/duo_web@1.0.3 lint duo_nodejs
> eslint duo.js index.js tests/
```

# Support

Report any bugs, feature requests, etc. to us directly: support@duosecurity.com

---
_Source: https://npm.io/package/@duosecurity/duo_web · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
