feathers-authentication-management: Migration error from disallow external

https://github.com/feathersjs/feathers/issues/849

Was asked to repost this issue here.

After migration to feathers v3 we get error from Auth-management service.

Error: MethodNotAllowed(405): Provider ‘socketio’ can not call ‘create’. (disableMethod)

We use commonHooks.disallow(‘external’) for ‘all’ hooks.before.

Our service:

const authManagement = require('feathers-authentication-management');
const notifier = require('./notifier');
const configUser = require('../user/config');

module.exports = app => authManagement({
  notifier: notifier(app).notifier,
  service: configUser.namespace,
  identifyUserProps: ['username', 'email', 'phone'],
});

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (4 by maintainers)

Most upvoted comments

Whenever the client uses feathers-authentication-management, a create call is made to its custom service on (default) path authManagement. You say you are disabling all external calls, so this one throws an error.

This has nothing to do with migrating to FeathersJS v3. It would not work in v2 either. You cannot disable its service on create.