@feathersjs/authentication-jwt

JWT authentication strategy for feathers-authentication using Passport

Stats

StarsIssuesVersionUpdatedCreatedSize
@feathersjs/authentication-jwt
13,578942.0.103 years ago4 years agoMinified + gzip package size for @feathersjs/authentication-jwt in KB

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.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.