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

Do you have userId in logs? #9

Closed
MikeKoval opened this issue Aug 14, 2023 · 2 comments
Closed

Do you have userId in logs? #9

MikeKoval opened this issue Aug 14, 2023 · 2 comments

Comments

@MikeKoval
Copy link

Hi!
I am calling http://localhost:3333/jwt/check but i get req.user as undefined in LoggerContextMiddleware, so no userId in logs.
Is it working for you?

@rabbitears333
Copy link

rabbitears333 commented Aug 14, 2023 via email

@CatsMiaow
Copy link
Owner

CatsMiaow commented Aug 16, 2023

@MikeKoval Thank you for reporting.
Because the global middleware runs before JwtGuard.

https://docs.nestjs.com/faq/request-lifecycle#summary

Fixed by cd7b96d
See LoggerContextMiddleware

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