Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Error options.service does not exist after initial auth setup #236

Closed
marshallswain opened this issue Jun 26, 2017 · 1 comment
Closed

Comments

@marshallswain
Copy link
Member

@franzherzog commented on Sun Jun 25 2017

Steps to reproduce

  • feathers generate authentication
  • select Username + Password (Local)
  • use a name different than the default "users"
  • proceed with generator

after finish

  • npm start
    throws error:
    options.service does not exist

workaround

  • open /path/to/project/config/default.json
  • change service name manual

{
...
"authentication": {
....
"local": {
"entity": "user",
"service": "users", <<<<<<<<<<<<<<<<<<< change to whatever your service is called
"usernameField": "email",
"passwordField": "password"
},
.....
"nedb": "../data"
}

System configuration

Linux Node v6.9
"feathers-authentication": "^1.2.6",
"feathers-authentication-hooks": "^0.1.4",
"feathers-authentication-jwt": "^0.3.1",
"feathers-authentication-local": "^0.4.3",


@marshallswain commented on Sun Jun 25 2017

Does the generator still create a /users service?


@franzherzog commented on Mon Jun 26 2017

nope, the service is generated like intended. 


@franzherzog commented on Mon Jun 26 2017

edit: yes the service for authentication is created but its not called the "/user" service any more because we changed the default name in the generator.


@marshallswain commented on Mon Jun 26 2017

I see. I'm going to move this to the generator-feathers repo, so we can get the generator fixed.

@marshallswain
Copy link
Member Author

marshallswain commented Jun 26, 2017

@franzherzog, thanks for reporting this. It looks like the authentication config is written here: https://github.com/feathersjs/generator-feathers/blob/master/generators/authentication/index.js#L128. Would you feel comfortable making a PR that writes the correct service path? If not, we'll get to this soon. Thanks, again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant