Nutty Peanut Marshmallow

    fido2-middleware
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.14 • Public • Published

    fido2-middleware

    Build Status Coverage Status All Contributors npm version License

    Install

    $ npm i fido2-middleware
    

    Usage

    const express = require('express');
    const bodyParser = require('body-parser');
    const cookieParser = require('cookie-parser');
    const cookieSession = require('cookie-session');
    const fido2middleware = require('fido2-middleware');
    const crypto = require('crypto');
    const app = express();
     
    app.use(cookieParser());
    app.use(bodyParser.json());
    app.use(cookieSession({
      name: 'session',
      keys: [crypto.randomBytes(32).toString('hex')],
      maxAge: 24 * 60 * 60 * 1000
    }));
    app.use(fido2middleware.webAuthentication);
     
     

    Configuration

    Fido2-middleware reads configuration files in the ./config directory for the running process, typically the application root. Place the following files in the config directory:

    {
        "fido2-middlewareConfig": {
            "fido2lib": {
                "timeout": 60000,
                "rpId": "localhost",
                "challengeSize": 32
            },
            "origin": "https://localhost:3000",
            "factor": "either"
        }
    }
    

    Example

    $ cd example
    $ npm install
    $ npm start
    

    Access to https://localhost:3000/.

    Contributors ✨

    Thanks goes to these wonderful people (emoji key):

    shiv3
    shiv3

    📖

    This project follows the all-contributors specification. Contributions of any kind welcome!

    Install

    npm i fido2-middleware

    DownloadsWeekly Downloads

    2

    Version

    0.0.14

    License

    Apache-2.0

    Unpacked Size

    169 kB

    Total Files

    46

    Last publish

    Collaborators

    • kg0r0