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
There are definitely some breaking changes from v4 -> v5 regarding this, we've been dealing with something similar - since we also have custom auth on most of our projects. When you set "entity": null in the config, the connection will have null: undefined, doesn't matter if you return user or entity.
There is a quick fix for it, on app.on('login') event you'll have access to the auth result so you can add it to the connection manually, ex connection.user = authenticationResult.authentication.payload.user; That would be line 7 in your channels.ts.
Steps to reproduce
Steps to reproduce can be found in the index.ts at this repo/branch:
https://github.com/jordandenison/feathers-local/tree/service-authentication-issues
Expected behavior
On login event in channels.ts, connection object should have the user data returned from the custom service
Actual behavior
Connection object user is undefined
System configuration
Module versions (especially the part that's not working):
NodeJS version: 20.9
Operating System: alpine
The text was updated successfully, but these errors were encountered: