# @feathersjs/authentication-jwt

> JWT authentication strategy for feathers-authentication using Passport

Latest version **2.0.10** (published 2019-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @feathersjs/authentication-jwt
pnpm add @feathersjs/authentication-jwt
yarn add @feathersjs/authentication-jwt
bun add @feathersjs/authentication-jwt
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.10 |
| Published | 2019-01-26 |
| First published | 2017-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/feathersjs__authentication-jwt) |
| Module format | CommonJS |
| Node | >= 6 |
| Dependencies | 6 |
| Unpacked size | 21 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Feathers contributors |
| Maintainers | corymsmith, daffl, ekryski, marshallswain |
| Keywords | feathers, feathers-plugin |

## Links

- npm: https://www.npmjs.com/package/@feathersjs/authentication-jwt
- Repository: https://github.com/feathersjs/feathers
- Homepage: https://feathersjs.com
- Issues: https://github.com/feathersjs/feathers/issues
- npm.io page: https://npm.io/package/@feathersjs/authentication-jwt

## Dependencies (6)

- [debug](https://npm.io/package/debug.md) ^4.0.0
- [lodash.omit](https://npm.io/package/lodash.omit.md) ^4.5.0
- [lodash.pick](https://npm.io/package/lodash.pick.md) ^4.4.0
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.0
- [passport-jwt](https://npm.io/package/passport-jwt.md) ^4.0.0
- [@feathersjs/errors](https://npm.io/package/@feathersjs/errors.md) ^3.3.6

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [stockfish](https://npm.io/package/stockfish.md) — 27.0K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads

## Recent versions

- 2.0.10 (latest) — 2019-01-26
- 1.0.0-pre.1 (pre) — 2017-10-25
- 2.0.9 — 2019-01-02
- 2.0.8 — 2018-12-16
- 2.0.7 — 2018-10-26
- 2.0.6 — 2018-10-25
- 2.0.5 — 2018-09-21
- 2.0.4 — 2018-09-17
- 2.0.3 — 2018-09-02
- 2.0.2 — 2018-08-30
- 2.0.1 — 2018-05-04
- 2.0.0 — 2018-01-21
- 1.0.2 — 2018-01-03
- 1.0.1 — 2017-11-16
- 1.0.0 — 2017-11-01

## README

# @feathersjs/authentication-jwt

[![Build Status](https://travis-ci.org/feathersjs/feathers.png?branch=master)](https://travis-ci.org/feathersjs/feathers)
[![Dependency Status](https://img.shields.io/david/feathersjs/feathers.svg?style=flat-square&path=packages/authentication-jwt)](https://david-dm.org/feathersjs/feathers?path=packages/authentication-jwt)
[![Download Status](https://img.shields.io/npm/dm/@feathersjs/authentication-jwt.svg?style=flat-square)](https://www.npmjs.com/package/@feathersjs/authentication-jwt)

> JWT authentication strategy for feathers-authentication using Passport

## Installation

```
npm install @feathersjs/authentication-jwt --save
```

## Quick example

```js
const feathers = require('@feathersjs/feathers');
const authentication = require('feathers-authentication');
const jwt = require('@feathersjs/authentication-jwt');
const app = feathers();

// Setup authentication
app.configure(authentication(settings));
app.configure(jwt());

// Setup a hook to only allow valid JWTs to authenticate
// and get new JWT access tokens
app.service('authentication').hooks({
  before: {
    create: [
      authentication.hooks.authenticate(['jwt'])
    ]
  }
});
```

## Documentation

Please refer to the [@feathersjs/authentication-jwt documentation](https://docs.feathersjs.com/api/authentication/jwt.html) for more details.


## License

Copyright (c) 2018

Licensed under the [MIT license](LICENSE).

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