@habloapp/unicauth

1.0.2 • Public • Published

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

Class Method HTTP request Description
Unicauth.UnicAuthApi create2FA POST /2fa/create/ Create 2FA
Unicauth.UnicAuthApi expireUserSession POST user/session/expire Expire User Session
Unicauth.UnicAuthApi getSession GET /session/ Get Session
Unicauth.UnicAuthApi getUserSession GET user/session Get User Session

Documentation for Models

Package Sidebar

Install

npm i @habloapp/unicauth

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

449 kB

Total Files

49

Last publish

Collaborators

  • unicauth