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
I am currently running feathers v4, and using custom JWTStrategy to add user role into JWT token. With this implementation i am unable to access authenticated web-services.
Is there any way to get permission with default JWTStrategy ?
{"name":"BadRequest","message":"Cast to ObjectId failed for value "admin" at path "_id" for model "users"","code":400,"className":"bad-request","errors":{}}
The text was updated successfully, but these errors were encountered:
I have started my project by referring this example, but due to some major changes in authentication of feathersjs i am not able to figure out the issue i mentioned.
I am using feathers v4 with a similar configuration as you described without issues. Are you sure the error is due to authentication config? From your error message, Cast to ObjectId failed for value "admin" at path "_id" for model "users"
It seems like it is trying to cast value "admin" to ObjectId type, which would fail as expected. Could the problem be that _id has the value "admin" and it might not be correct?
I am currently running feathers v4, and using custom JWTStrategy to add user role into JWT token. With this implementation i am unable to access authenticated web-services.
Is there any way to get permission with default JWTStrategy ?
Please check my code
authentication.js
`
users.hooks.js
Error
The text was updated successfully, but these errors were encountered: