# @apikee/authenticator-mongostore

> MongoDB Store for @apikee/authenticator

Latest version **0.0.2** (published 2022-07-17) · 0 weekly downloads

## Install

```sh
npm install @apikee/authenticator-mongostore
pnpm add @apikee/authenticator-mongostore
yarn add @apikee/authenticator-mongostore
bun add @apikee/authenticator-mongostore
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-07-17 |
| First published | 2022-07-17 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jakub Tomáš |
| Maintainers | apikee |

## Links

- npm: https://www.npmjs.com/package/@apikee/authenticator-mongostore
- Repository: https://github.com/apikee/authenticator-mongostore
- Homepage: https://github.com/apikee/authenticator-mongostore#readme
- Issues: https://github.com/apikee/authenticator-mongostore/issues
- npm.io page: https://npm.io/package/@apikee/authenticator-mongostore

## Dependencies (2)

- [mongoose](https://npm.io/package/mongoose.md) ^6.4.4
- [@apikee/authenticator-common](https://npm.io/package/@apikee/authenticator-common.md) ^0.0.6

## Recent versions

- 0.0.2 (latest) — 2022-07-17
- 0.0.1 — 2022-07-17

## README

## @apikee/authenticator-mongostore

**MongoDB Store for @apikee/authenticator**

It uses [mongoose](https://github.com/Automattic/mongoose) under the hood

## Installation

```tsx
npm i @apikee/authenticator-mongostore
```

## Usage

```tsx
import { Authenticator } from '@apikee/authenticator';
import { MongoStore, ConnectOptions } from '@apikee/authenticator-mongostore';

const mongooseConnectOptions: ConnectOptions = {};

const { createAccess, validateAccess, refreshAccess, revokeAccess } = new Authenticator({
  accessKey: "verySecretAccessKeyPleaseChangeMeOrUseDotenv", // Never commit your secrets to public repo
  refreshKey: "verySecretRefreshKeyPleaseChangeMeOrUseDotenv", // Never commit your secrets to public repo
  store: new MongoStore("mongodb://localhost:27017/DB_NAME", mongooseConnectOptions, () => {
    console.log("DB Connected")
  })
})
```

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