You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.
className: "general-error"
code: 500
data: Object { }
errors: Object { }
message: "the `id` property must be set on the entity service for authentication"
name: "GeneralError"
stack: "FeathersError@http://localhost:3000/_nuxt/app.e42a4ab34fc5e966dc8b.js:8069:19\nGeneralError@http://localhost:3000/_nuxt/app.e42a4ab34fc5e966dc8b.js:8176:3\nconvert@http://localhost:3000/_nuxt/app.e42a4ab34fc5e966dc8b.js:8245:7\ntoError@http://localhost:3000/_nuxt/app.e42a4ab34fc5e966dc8b.js:8392:9\n"
type: "FeathersError"
How I solved it
@feathersjs/authentication-local in lib/verifier.js:
Add this.service.id = this.service.sequelize.id in the constructor.
class LocalVerifier {
constructor (app, options = {}) {
this.app = app;
this.options = options;
this.service = typeof options.service === 'string' ? app.service(options.service) : options.service;
this.service.id = this.service.sequelize.id; // <--- this line
if (!this.service) {
throw new Error(`options.service does not exist.\n\tMake sure you are passing a valid service path or service instance and it is initialized before @feathersjs/authentication-local.`);
}
this._comparePassword = this._comparePassword.bind(this);
this._normalizeResult = this._normalizeResult.bind(this);
this.verify = this.verify.bind(this);
}
Expected behavior
Authenticate user
Actual behavior
How I solved it
@feathersjs/authentication-local in lib/verifier.js:
Add
this.service.id = this.service.sequelize.id
in the constructor.System configuration
"@feathersjs/authentication": "^2.1.0",
"@feathersjs/authentication-jwt": "^1.0.1",
"@feathersjs/authentication-local": "^1.0.2",
"@feathersjs/authentication-oauth2": "^1.0.2",
"@feathersjs/configuration": "^1.0.1",
"@feathersjs/errors": "^3.2.0",
"@feathersjs/express": "^1.1.2",
"@feathersjs/feathers": "^3.0.2",
The text was updated successfully, but these errors were encountered: