Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio Code Debug no authentication #583

Closed
oussamaABID opened this Issue Oct 5, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@oussamaABID
Copy link

oussamaABID commented Oct 5, 2017

hello
i try this blog :https://blog.feathersjs.com/debugging-feathers-with-visual-studio-code-406e6adf2882

Steps to reproduce

  • generate project with feathers-cli
  • debug with visual studio code

Error :

   throw new Error('You must provide a \'secret\' in your authentication configuration');
      ^

Error: You must provide a 'secret' in your authentication configuration
 at EventEmitter.authentication (c:\Users\node_modules\feathers-authentication\lib\index.js:58:13)
    at EventEmitter.configure (c:\Users\node_modules\feathers\lib\application.js:150:8)
    at EventEmitter.module.exports (c:\Users\src\authentication.js:13:7)
    at EventEmitter.configure (c:\Users\node_modules\feathers\lib\application.js:150:8)

 

when i try

 const config = app.get('authentication');
console.log(JSON.stringfy(config));
//config is undefined

System configuration

my lanche.json


{
    "version": "0.2.0",
    "configurations": [

        {
            "env": {
                "NODE_ENV": "development"
            },
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceRoot}/src/index.js"
        }
    ]
}
"dependencies": {
    "@google/maps": "0.4.3",
    "abstract-blob-store": "3.2.0",
    "body-parser": "1.18.1",
    "compression": "1.7.0",
    "cors": "2.8.4",
    "feathers": "2.2.0",
    "feathers-authentication": "1.2.7",
    "feathers-authentication-hooks": "0.1.4",
    "feathers-authentication-jwt": "0.3.2",
    "feathers-authentication-local": "0.4.4",
    "feathers-authentication-oauth2": "0.2.6",
    "feathers-blob": "1.3.1",
    "feathers-configuration": "0.4.1",
    "feathers-errors": "2.9.2",
    "feathers-hooks": "2.0.2",
    "feathers-hooks-common": "3.7.2",
    "feathers-mongodb": "2.9.0",
    "feathers-mongoose": "5.1.2",
    "feathers-rest": "1.8.0",
    "feathers-socketio": "2.0.0",
    "fs-blob-store": "5.2.1",
    "helmet": "3.8.1",
    "mongodb": "2.2.31",
    "mongoose": "4.11.11",
    "passport-facebook": "2.1.1",
    "passport-google-oauth20": "1.0.0",
    "serve-favicon": "2.4.4",
    "winston": "2.3.1"
  },
  "devDependencies": {
    "dotenv": "4.0.0",
    "eslint": "4.7.0",
    "mocha": "3.5.3",
    "request": "2.81.0",
    "request-promise": "4.2.1"
  }

@oussamaABID oussamaABID changed the title VSC Debug Visual Studio Code Debug no authentication Oct 6, 2017

@oussamaABID

This comment has been minimized.

Copy link
Author

oussamaABID commented Oct 6, 2017

missing config

"NODE_CONFIG_DIR": "${workspaceRoot}/config/"

https://legacy.docs.feathersjs.com/configuration/readme.html

@oussamaABID oussamaABID closed this Oct 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.