How to log authenticated user information using morgan?

34 views Asked by At

I am using next-auth with my React.JS / Next.JS application using morgan. How do I log authenticated user? User: ':remote-user', doesn't give me anything at all. If I could set the req header, how do I retrieve and log it at the server using User: ':req[header]',?

0

There are 0 answers