feathersjs-ecosystem / configuration

[MOVED] A plugin for configuring a Feathers application
https://github.com/feathersjs/feathers
MIT License
28 stars 15 forks source link

Config adding a value of userName in runtime its overwritten to the OS name #58

Closed axmad22 closed 6 years ago

axmad22 commented 6 years ago

I added the auth config values to the config files, and for the local when I set the usernameField to use userName instead of email in run-time it replaces the usernameField value to my PC name. If I add anything else it works but not username.

 local: {
      entity: 'user',
      usernameField: 'userName',
      passwordField: 'password'
  }

// becomes 

local: {
      entity: 'user',
      usernameField: 'MyPcName',
      passwordField: 'password'
  }
daffl commented 6 years ago

It will first try to use the environment variable username and fill it in if it exists. If you do not want that escape with \.

 local: {
      entity: 'user',
      usernameField: '\\userName',
      passwordField: 'password'
  }