3.0.1 • Published 4 years ago

feathers-authentication-compatibility v3.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

feathers-authentication-compatibility

This module keeps the old client libraries 0.x using auth local and socket.io compatible with auk style login 1.0+.

Usage

   npm install feathers-authentication-compatibility

legacy endpoint /auth/local

const authenticationCompatibility = require('feathers-authentication-compatibility');
// after app.configure(authentication);
app.configure(authenticationCompatibility({ options }));

Defaults for options are:

  • path: '/authentication',
  • legacyPath: '/auth/local',
  • socket: true,

legacy client request syntax

const authenticationCompatibility = require('feathers-authentication-compatibility');

app.service('authentication').hooks({
  before: {
    create: [
      authenticationCompatibility.beforeAuthenticationCreateHook()
    ]
  }
});

send user and token in response

const authenticationCompatibility = require('feathers-authentication-compatibility');

app.service('authentication').hooks({
  after: {
    create: [
      authenticationCompatibility.afterAuthenticationReturnLegacyTokenHook(),
      authenticationCompatibility.afterAuthenticationReturnUserHook()
    ]
  }
});
3.0.1

4 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago