# @hapi/jwt

> JWT (JSON Web Token) Authentication

Latest version **3.2.4** (published 2026-06-12) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @hapi/jwt
pnpm add @hapi/jwt
yarn add @hapi/jwt
bun add @hapi/jwt
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.2.4 |
| Published | 2026-06-12 |
| First published | 2020-07-13 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 51.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Maintainers | nlf, devinivy, wyatt, lloydbenson, cjihrig, marsup |
| Keywords | jwt, authentication, plugin, hapi |

## Links

- npm: https://www.npmjs.com/package/@hapi/jwt
- Repository: https://github.com/hapijs/jwt
- Homepage: https://github.com/hapijs/jwt#readme
- Issues: https://github.com/hapijs/jwt/issues
- npm.io page: https://npm.io/package/@hapi/jwt

## Dependencies (10)

- [joi](https://npm.io/package/joi.md) ^18.2.1
- [@hapi/b64](https://npm.io/package/@hapi/b64.md) ^6.0.1
- [@hapi/boom](https://npm.io/package/@hapi/boom.md) ^10.0.1
- [@hapi/hoek](https://npm.io/package/@hapi/hoek.md) ^10.0.1
- [@hapi/wreck](https://npm.io/package/@hapi/wreck.md) ^18.1.2
- [@hapi/bounce](https://npm.io/package/@hapi/bounce.md) ^3.0.2
- [@hapi/bourne](https://npm.io/package/@hapi/bourne.md) ^3.0.0
- [@hapi/cryptiles](https://npm.io/package/@hapi/cryptiles.md) ^6.0.3
- [@hapi/catbox-object](https://npm.io/package/@hapi/catbox-object.md) ^3.0.1
- [ecdsa-sig-formatter](https://npm.io/package/ecdsa-sig-formatter.md) ^1.0.11

## 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

- 3.2.4 (latest) — 2026-06-12
- 3.2.3 — 2025-12-11
- 3.2.2 — 2025-12-09
- 3.2.1 — 2025-09-02
- 3.2.0 — 2023-03-14
- 3.1.0 — 2023-02-04
- 3.0.0 — 2022-08-29
- 2.2.0 — 2022-08-29
- 2.1.1 — 2022-03-24
- 2.1.0 — 2021-08-17
- 2.0.1 — 2020-09-27
- 2.0.0 — 2020-07-13

## README

<a href="http://hapijs.com"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a>

# @hapi/jwt

#### JWT (JSON Web Token) Authentication.
**jwt** is part of the **hapi** ecosystem and was designed to work seamlessly with the [hapi web framework](https://hapi.dev) and its other components (but works great on its own or with other frameworks). If you are using a different web framework and find this module useful, check out [hapi](https://hapi.dev) – they work even better together.

### Visit the [hapi.dev](https://hapi.dev) Developer Portal for tutorials, documentation, and support

## Useful resources

- [Documentation and API](https://hapi.dev/family/jwt/)
- [Versions status](https://hapi.dev/resources/status/#jwt) (builds, dependencies, node versions, licenses, eol)
- [Changelog](https://hapi.dev/family/jwt/changelog/)
- [Project policies](https://hapi.dev/policies/)

## Acknowledgements

Portions of this module were adapted from:

- [node-jwa](https://github.com/brianloveswords/node-jwa), copyright (c) 2013 Brian J. Brennan, MIT License
- [node-jws](https://github.com/brianloveswords/node-jws), copyright (c) 2013 Brian J. Brennan, MIT License
- [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken), copyright (c) 2015 Auth0, Inc., MIT License
- [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa), copyright (c) 2016 Sandrino Di Mattia, MIT License
- [hapi-auth-jwt2](https://github.com/dwyl/hapi-auth-jwt2), copyright (c) 2015-2016, dwyl ltd, ISC License
- [mock-jwks](https://github.com/Levino/mock-jwks), copyright (c) 2018-2019 Levin Keller, MIT License
- [Stack Overflow answer](http://stackoverflow.com/questions/18835132/xml-to-pem-in-node-js)
- [node-rsa-pem-from-mod-exp](https://github.com/tracker1/node-rsa-pem-from-mod-exp), copyright (c) 2014 Michael J. Ryan, MIT License

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