1.0.4 • Published 3 years ago

@habloapp/passport-unicauth v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Unic Auth Strategy for Passport

Unic Auth Strategy for Passport using Unic Auth API

Unic Auth allows you to quickly implement userless/passwordless login and 2FA (no more paying for SMS to have 2FA)

Installation

First make sure to get your credentials on Unic Auth, if you want to test first, use Unic Auth - Demo

For Node.js

npm

Install it via:

npm install @habloapp/passport-unicauth --save

Example

const UnicAuthStrategy = require('@habloapp/passport-unicauth').Strategy

const strategy = new UnicAuthStrategy({
    appKey: APPLICATION_APPKEY,
    readKey: APPLICATION_READKEY,
    writeKey: APPLICATION_WRITEKEY,
    passReqToCallback: true
  },
  function(req, profile, done) {
    // ...
  }
)

At Passport docs you can find more examples on how Passport works with strategies.