feathersjs-ecosystem / feathers-authentication-management

Adds sign up verification, forgotten password reset, and other capabilities to local feathers-authentication
https://feathers-a-m.netlify.app/
MIT License
247 stars 98 forks source link

check unique is not working with mongodb #133

Closed alidplus closed 4 years ago

alidplus commented 4 years ago

when comparing a string (ownId) with a objectId (mongodb id) in the: https://github.com/feathers-plus/feathers-authentication-management/blob/95e5801229adba72b69e2bc7a9eb507b280db8bc/src/check-unique.js#L27 items[0][usersServiceIdName] is not equal in type with ownId

claustres commented 4 years ago

Could you provide a use case or code sample ? This hook is expected to be called on the client side so that all values are strings, eg as a before create hook on the user service.

claustres commented 4 years ago

This operation is expected to be called on the front side so that you should not have an ObjectId but a string.