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

[authentication-local] Error: the id property must be set on the entity service for authentication #1188

Closed
Mangatt opened this issue Jan 29, 2019 · 3 comments

Comments

@Mangatt
Copy link

Mangatt commented Jan 29, 2019

Steps to reproduce

When you combine @feathersjs/authentication-local with custom service (e.g. not with provided one), you'll get this error Error: the 'id' property must be set on the entity service for authentication from verifier.js#81.

I took me quite a while to reverse engineer where is the problem. Appareantly it is talking about users service, not authentication one and setting this.id on custom service makes magically everything working again.

Expected behavior

There should be mention about that in docs or added configuration option for auth plugin.

Actual behavior

It makes you wonder what is going on instead of making you productive.

@daffl
Copy link
Member

daffl commented Feb 7, 2019

This will be fixed by Authentication v3 (#1045) where you can explicitly set the entityId in your configuration.

@averri
Copy link

averri commented May 3, 2019

@Mangatt and @daffl , could you please provide more information about how to set the entityId? Please post the hooks for the users service.

@daffl
Copy link
Member

daffl commented Jun 6, 2019

This has been done in Feathers v4 authentication where entityId can be set in the service configuration. See the migration guide for more information.

@daffl daffl closed this as completed Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants