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
Node.js
Fornpm
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.