Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

@feathersjs/authentication-jwt

2.0.1 • Public • Published

@feathersjs/authentication-jwt

Greenkeeper badge

Build Status Test Coverage 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.

install

npm i @feathersjs/authentication-jwt

Downloadsweekly downloads

3,854

version

2.0.1

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar