aboutsummaryrefslogtreecommitdiff
path: root/services/auth/auth.service.ts
blob: 826357c440db945c2d7346b0e53a818cf28e9034 (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);
};