duo_web_sdk_fork
v2.7.0
Published
Provides the Duo Web Javascript in an ES6 module format that can be installed via npm and bundled into your web application.
Downloads
44
Maintainers
Readme
Deprecation Notice
This repository is deprecated by Duo Security. The repository will remain public and visible, and integrations built using this repository’s code will continue to work. You can also continue to fork, clone, or pull from this repository.
However, Duo will not provide any further releases or enhancements.
Duo recommends migrating your application to the Duo Universal Prompt. Refer to our documentation for more information on how to update.
For frequently asked questions about the impact of this deprecation, please see the Repository Deprecation FAQ
Overview
duo_web_sdk - Provides the Duo Web Javascript in an ES6 module format that can be installed via npm/yarn and bundled into your web application.
Installation
Install duo_web_sdk
from Github:
- With NPM:
npm install https://github.com/duosecurity/duo_web_sdk.git --save
- With yarn:
yarn add https://github.com/duosecurity/duo_web_sdk.git
- For development:
npm install
Usage
Basic usage would be importing this module and initializing the Duo Authentication Prompt with the signed request passed from the server. The user would authenticate using the prompt, and you would submit the signed response to your backend for verification.
import DuoWebSDK from 'duo_web_sdk';
DuoWebSDK.init({
iframe: "duo-frame",
host: host,
sig_request: sigRequestPassedFromServer,
submit_callback: someCallback,
});
See the examples folder for a full implementation using React and Express.
Testing
$ npm test
Documentation
General documentation on using Duo Web is available here.