-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Express request.user
is not used since 8.40.0
#14847
Comments
Thank you for writing in! First of all, you are right that our docs are lacking here. I opened a PR to improve on this, explaining how you can/should set the user yourself: getsentry/sentry-docs#12224 Generally speaking, I would recommend you to do this anyhow, as in v9 we will def. remove the default user setting from the request - see #14806. As of now (v8), this is kind of an incidental thing. I would classify it as a bug that the user is not picked up anymore, as you described 😬 although this is not fully specced out anywhere, we used to take it, so this should continue to work on v8. I'll look into this to find out why this is happening, it is probably related to #14401 or #14315. |
Could you share your express app setup, e.g. which middleware(s) are you using? |
request.user
is not used since 8.40.0
Thanks, I'll have a look at the docs PR! We have a very long list of middleware 😅 But relevant for this we use If |
Thanks for the information! I think I have a fix pending here: #14850, I hope this will resolve the issue! |
Thanks for the fast feedback and resolution! |
A PR closing this issue has just been released 🚀This issue was referenced by PR #14851, which was included in the 8.48.0 release. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.47.0
Framework Version
Express 5.0.1
Link to Sentry event
https://fl101.sentry.io/issues/6062464177/events/77ae0d4d27ca49da82cb9f19d8bca736/?project=4505209444958208
Reproduction Example/SDK Setup
We're running a web app with Express and Sentry tracked User ID and email automatically (Based on
req.user
I would assume?) until 8.40.0. Since then it has been broken and the docs don't really provide any guidance for how to properly set the user ID in the context of a request.Steps to Reproduce
Expected Result
User is set or documentation is provided for how to do it manually as well as a note in the changelog that this is no longer done automatically.
Actual Result
User is not set
The text was updated successfully, but these errors were encountered: