# test-auth-core

> The set of utilities necessary to build an authentication service. This does not include templates, views, styles, or transport layer.

Latest version **0.1.5** (published 2019-04-10) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install test-auth-core
pnpm add test-auth-core
yarn add test-auth-core
bun add test-auth-core
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2019-04-10 |
| First published | 2019-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 20 |
| Unpacked size | 11.2 MB |
| Known vulnerabilities | 0 (+9 in 6 direct dependencies) |
| Install scripts | no |
| Author | vladexologija |
| Maintainers | vladexologija |

## Links

- npm: https://www.npmjs.com/package/test-auth-core
- Repository: https://github.com/vladexologija/CleverAuth
- Homepage: https://github.com/vladexologija/CleverAuth#readme
- Issues: https://github.com/vladexologija/CleverAuth/issues
- npm.io page: https://npm.io/package/test-auth-core

## Dependencies (20)

- [joi](https://npm.io/package/joi.md) ^11.1.1
- [knex](https://npm.io/package/knex.md) ^0.13.0
- [uuid](https://npm.io/package/uuid.md) ^3.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [qrcode](https://npm.io/package/qrcode.md) ^0.9.0
- [scrypt](https://npm.io/package/scrypt.md) ^6.0.3
- [mongodb](https://npm.io/package/mongodb.md) ^2.2.31
- [speakeasy](https://npm.io/package/speakeasy.md) ^2.0.0
- [@types/joi](https://npm.io/package/@types/joi.md) ^10.4.3
- [node-fetch](https://npm.io/package/node-fetch.md) ^1.7.3
- [@types/knex](https://npm.io/package/@types/knex.md) ^0.0.61
- [@types/uuid](https://npm.io/package/@types/uuid.md) ^3.4.2
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.0.1
- [@types/lodash](https://npm.io/package/@types/lodash.md) ^4.14.76
- [@types/qrcode](https://npm.io/package/@types/qrcode.md) ^0.8.0
- [@types/mongodb](https://npm.io/package/@types/mongodb.md) ^2.2.11
- [@types/speakeasy](https://npm.io/package/@types/speakeasy.md) ^2.0.1
- [@types/node-fetch](https://npm.io/package/@types/node-fetch.md) ^1.6.7
- [pnp-email-service](https://npm.io/package/pnp-email-service.md) ^0.1.8
- [@types/jsonwebtoken](https://npm.io/package/@types/jsonwebtoken.md) ^7.2.3

## Recent versions

- 0.1.5 (latest) — 2019-04-10

## README

# CleverAuth Core

```javascript
import {
  Core,
  KnexAdapter,
  MongoAdapter,
  DefaultEmailService,
  Crypto,
  JWT,
  Validations,
  TwilioSMSService
} from '@evercast.us/auth-core'

const db = new MongoAdapter('<uri>')
const db = new KnexAdapter({
  // knex config here
})
const sms = new TwilioSMSService(
  '<accountSid>',
  '<authToken>',
  '<numberFrom>'
})

const core = new Core({
  projectName: '<projectName>',
  db,
  email: new DefaultEmailService({
    projectName: '',
    confirmEmailURL: '',
    requestResetPasswordURL: '',
    resetPasswordURL: '',
    emailServiceConfig: {
      // config for pnp-email-service
    }
  }),
  crypto: new Crypto('<key>', '<algorithm> = aes-256-gcm'),
  jwt: new JWT('<algorithm>', '<secretOrPrivateKey>', '<secretOrPublicKey>', {
    // default options: see https://github.com/auth0/node-jsonwebtoken#usage
  }),
  validations: new Validations(['name', 'company'], true),
  sms,
  numberOfRecoverCodes: 10
})
```

---
_Source: https://npm.io/package/test-auth-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
