# @mistflow/jwt-node

> A JWT authentication library

Latest version **1.0.1** (published 2023-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mistflow/jwt-node
pnpm add @mistflow/jwt-node
yarn add @mistflow/jwt-node
bun add @mistflow/jwt-node
```

## 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.1 |
| Published | 2023-04-24 |
| First published | 2023-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | mistflow |
| Maintainers | mistflow |
| Keywords | jwt, authentication |

## Links

- npm: https://www.npmjs.com/package/@mistflow/jwt-node
- npm.io page: https://npm.io/package/@mistflow/jwt-node

## Dependencies (1)

- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@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

## Recent versions

- 1.0.1 (latest) — 2023-04-24
- 1.0.0 — 2023-04-24

## README

# jwt-node

```
const JWTAuth = require('@mistflow/jwt-node')
const Config = require('@mistflow/jwt-node/src/config')

const config = new Config(
    'your-secret-key',
    'your-issuer', // optional
    'your-audience', // optional
    '1h', // token expiration time
)

const jwtAuth = new JWTAuth(config)
const token = jwtAuth.createToken(user)

const verify = jwtAuth.verifyToken(token)
console.log(verify.isValid) // verify.payload - for payload
```

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