@feathersjs/authentication-jwt

A framework for real-time applications and REST APIs with JavaScript and TypeScript

Showing:

Popularity

Downloads/wk

2.3K

GitHub Stars

13.8K

Maintenance

Last Commit

2mos ago

Contributors

190

Package

Dependencies

6

License

MIT

Type Definitions

Not Found

Tree-Shakeable

No?

Readme

@feathersjs/authentication-jwt

Build Status Dependency Status Download Status

JWT authentication strategy for feathers-authentication using Passport

Installation

npm install @feathersjs/authentication-jwt --save

Quick example

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 for more details.

License

Copyright (c) 2018

Licensed under the MIT license.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
Jems4 Ratings0 Reviews
August 15, 2020

Tutorials

No tutorials found
Add a tutorial