@habloapp/unicauth
v1.0.2
Published
Unic Auth SDK package
Downloads
5
Maintainers
Readme
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
- Unicauth.Create2FARequest
- Unicauth.Create2FAResponse
- Unicauth.ExpireUserSessionRequest
- Unicauth.ExpireUserSessionRequestData
- Unicauth.ExpireUserSessionResponse
- Unicauth.ExpireUserSessionResponseData
- Unicauth.GetSessionResponse
- Unicauth.GetSessionResponseData
- Unicauth.GetUserSessionResponse
- Unicauth.GetUserSessionResponseData
- Unicauth.Model2FARequestData
- Unicauth.Model2FAResponseData
- Unicauth.ResponseError