Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚开始使用节点应用程序。对于身份验证,我使用 JWT。所以我有一个问题,如何在 UI 和后端正确使用它。
例如,我获得令牌,将其保存在会话存储中,然后我为当前用户发送一些集合的请求。问题是 - 它是否需要在请求中也存储用户名,或者我可以理解什么用户通过令牌发送请求?
谷歌是你的朋友——网上有很多关于这个的教程,例如