Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MichaelErmer/feathers-authentication-compatibility

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()
    ]
  }
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.