1.0.2 • Published 3 years ago

@habloapp/unicauth v1.0.2

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

Unic Auth

Unic Auth - Node.js client for Unic Auth API

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

We recommend using our Unic Auth Wrapper instead of this module.

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/unicauth --save

Getting Started

Please follow the installation instruction and execute the following JS code:

var unicauth = require('@habloapp/unicauth');

var api = new unicauth.UnicAuthApi()
var body = new unicauth.Create2FARequest(); // {Create2FARequest} 
var x_ua_appKey = "x_ua_appKey_example"; // {String} Application `appKey`

api.create2FA(body, x_ua_appKey).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://unicauth.com/api

ClassMethodHTTP requestDescription
Unicauth.UnicAuthApicreate2FAPOST /2fa/create/Create 2FA
Unicauth.UnicAuthApiexpireUserSessionPOST user/session/expireExpire User Session
Unicauth.UnicAuthApigetSessionGET /session/Get Session
Unicauth.UnicAuthApigetUserSessionGET user/sessionGet User Session

Documentation for Models