feathersjs-ecosystem / authentication-local

[MOVED] Local authentication plugin for feathers-authentication
https://github.com/feathersjs/feathers
MIT License
26 stars 15 forks source link

Does not pull from global auth config when strategy has a custom name #1

Closed ekryski closed 7 years ago

ekryski commented 7 years ago

See this line.

Steps to reproduce

// in config
{
  "auth": {
    "secret": "TpJUzOHgY5D2PHV9RSmLJT4x/IH2RAWtHkGPgDlSXY/xXwOrSZGx2xy9CupED0+dFsbIaA3wfwYaBVyqoLm6uQ==",
    "local-device": {
      "usernameField": "clientId",
      "passwordField": "clientSecret",
      "entity": "device",
      "service": "devices"
    }
  }
}
// in code
app.configure(authentication(app.get('auth')))
    .configure(local())
    .configure(local({ name: 'local-device' }))

local-device doesn't pull from the main auth config.

Expected behavior

Should be able to put custom local strategy options in the auth config.

Actual behavior

Instead it uses the default config.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working): 0.2.0

ekryski commented 7 years ago

See how it is done in the OAuth2 plugin. Should probably just be the same.