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.
我一直在使用 Passport JWT 进行身份验证,签名的有效负载是用户名和卖家。现在的问题是,每次我更新用户名并尝试获取用户详细信息时,它都会给出 401。所以我正在寻找一种方法来优雅地使用nestjs 中的护照 jwt 来处理这个问题
使用用户 ID 和卖家 ID 作为有效负载怎么样?这些值不会更改,因此即使用户名更改,令牌仍然有效