# @habloapp/unicauth-wrapper

> Unic Auth wrapper for Unic Auth SDK.

Latest version **1.0.3** (published 2021-09-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @habloapp/unicauth-wrapper
pnpm add @habloapp/unicauth-wrapper
yarn add @habloapp/unicauth-wrapper
bun add @habloapp/unicauth-wrapper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-09-08 |
| First published | 2021-09-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | HabloApp Inc. |
| Maintainers | mschuelter, marcos.habloapp, unicauth |
| Keywords | unicauth, auth, authn, authentication, authz, authorization, 2fa, passwordless |

## Links

- npm: https://www.npmjs.com/package/@habloapp/unicauth-wrapper
- Repository: https://github.com/habloapp/unicauth-wrapper
- Homepage: https://unicauth.com/alpha
- Issues: https://github.com/habloapp/unicauth-wrapper/issues
- npm.io page: https://npm.io/package/@habloapp/unicauth-wrapper

## Dependencies (2)

- [esm](https://npm.io/package/esm.md) ^3.2.25
- [@habloapp/unicauth](https://npm.io/package/@habloapp/unicauth.md) 1.0.x

## Alternatives

- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads
- [escher-request](https://npm.io/package/escher-request.md) — 545 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2021-09-08
- 1.0.2 — 2021-09-08
- 1.0.1 — 2021-09-08

## README

# unicauth

Unic Auth Wrapper - Node.js client for [Unic Auth API](https://unicauth.com/alpha/docs/)
<br>

Unic 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 [Unic Auth](https://console.unicauth.com/), if you want to test first, use [Unic Auth - Demo](https://unicauth.com/demo)

### For [Node.js](https://nodejs.org/)

#### npm

Install it via:

```shell
npm install @habloapp/unicauth-wrapper --save
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var unicauthwrapper = require('@habloapp/unicauth-wrapper');

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

## Documentation

* unicauthwrapper.configure(config)
* unicauthwrapper.create2FA(customID, returnUrl, webhookUrl, phone, email, question, userID, mobileReturnUrl)
* unicauthwrapper.getSession(s)
* unicauthwrapper.getUserSession(sessionID, userID)
* unicauthwrapper.expireUserSession(sessionID, userID)

---
_Source: https://npm.io/package/@habloapp/unicauth-wrapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
