Circle Auth - Node.js client for Circle Auth API
Circle Auth allows you to quickly implement userless/passwordless login and 2FA (no more paying for SMS to have 2FA)
We recommend using our Circle Auth Wrapper instead of this module.
First make sure to get your credentials on Circle Auth Console, if you want to test first, use Circle Auth - Demo
For Node.js
Install it via:
npm install @circlesystems/circleauth --save
Please follow the installation instruction and execute the following JS code:
var circleauth = require('@circlesystems/circleauth');
var api = new circleauth.CircleAuthApi()
var body = new circleauth.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);
});
All URIs are relative to https://circleaccess.circlesecurity.ai/api
Class | Method | HTTP request | Description |
---|---|---|---|
CircleAuth.CircleAuthApi | create2FA | POST /2fa/create/ | Create 2FA |
CircleAuth.CircleAuthApi | expireUserSession | POST user/session/expire | Expire User Session |
CircleAuth.CircleAuthApi | getSession | GET /session/ | Get Session |
CircleAuth.CircleAuthApi | getUserSession | GET user/session | Get User Session |
- CircleAuth.Create2FARequest
- CircleAuth.Create2FAResponse
- CircleAuth.ExpireUserSessionRequest
- CircleAuth.ExpireUserSessionRequestData
- CircleAuth.ExpireUserSessionResponse
- CircleAuth.ExpireUserSessionResponseData
- CircleAuth.GetSessionResponse
- CircleAuth.GetSessionResponseData
- CircleAuth.GetUserSessionResponse
- CircleAuth.GetUserSessionResponseData
- CircleAuth.Model2FARequestData
- CircleAuth.Model2FAResponseData
- CircleAuth.ResponseError
- Update package
version
atpackage.json
. - Open terminal and run
npm publish
. - Visit https://www.npmjs.com/package/@circlesystems/circleauth to check latest version.