aboutsummaryrefslogtreecommitdiff
path: root/services/auth/auth.service.ts
blob: 42846b08e72745e6e3bf1ff030b55732cffb20e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import {
  AuthenticationService,
  JWTStrategy 
} from '@feathersjs/authentication';
import { LocalStrategy } from '@feathersjs/authentication-local';
import { Application } from '@feathersjs/express';

export default (app: Application): void => {
  const authentication = new AuthenticationService(app);

  authentication.register('local', new LocalStrategy());
  authentication.register('jwt', new JWTStrategy());

  app.use('/authentication', authentication);
};