@circlesystems/circleauth-wrapper

1.2.8 • Public • Published

Circle Auth Wrapper

Circle Auth Wrapper - 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)

Installation

First make sure to get your credentials on Circle Auth Console, if you want to test first, use Circle Auth - Demo

For Node.js

npm

Install it via:

npm install @circlesystems/circleauth-wrapper --save

Getting Started

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

var circleauthwrapper = require('@circlesystems/circleauth-wrapper');

circleauthwrapper.configure({
  appKey: APPLICATION_APPKEY,
  readKey: APPLICATION_READKEY,
  writeKey: APPLICATION_WRITEKEY,
})
try {
  let data = await circleauthwrapper.create2FA(customID, returnUrl, webhookUrl, phone, email, question, userID, mobileReturnUrl)
  console.log('API called successfully. Returned data: ' + data);
} catch (error) {
  console.error(error);
}

Documentation

  • circleauthwrapper.configure(config)
  • circleauthwrapper.create2FA(customID, returnUrl, webhookUrl, phone, email, question, userID, mobileReturnUrl)
  • circleauthwrapper.getSession(sessionID)
  • circleauthwrapper.getUserSession(sessionID, userID)
  • circleauthwrapper.expireUserSession(sessionID, userID)

Distribuition

  1. Update package version at package.json.
  2. Open terminal and run npm publish.
  3. Visit https://www.npmjs.com/package/@circlesystems/circleauth-wrapper to check latest version.

Package Sidebar

Install

npm i @circlesystems/circleauth-wrapper

Weekly Downloads

5

Version

1.2.8

License

ISC

Unpacked Size

9.33 kB

Total Files

4

Last publish

Collaborators

  • unicauth