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

https://edu.duthanhduoc.com/learn/Nest.js-Super?lessonId=699 #101

Open
utterances-bot opened this issue Feb 13, 2025 · 2 comments
Open

https://edu.duthanhduoc.com/learn/Nest.js-Super?lessonId=699 #101

utterances-bot opened this issue Feb 13, 2025 · 2 comments

Comments

@utterances-bot
Copy link

Khu vực học tập | Được Edu

Được chỉ cung cấp các khóa học lập trình online chất lượng, nói không với khóa lởm!

https://edu.duthanhduoc.com/learn/Nest.js-Super?lessonId=699

Copy link

gechym commented Feb 13, 2025

best practice thì các bạn nên thêm một cái uuid vào trong payload token nha có khả năng request cùng 1 lúc có thể tạo ra các token giống nhau dẫn đến ko unique đc bảng refresh

@duthanhduoc
Copy link
Contributor

best practice thì các bạn nên thêm một cái uuid vào trong payload token nha có khả năng request cùng 1 lúc có thể tạo ra các token giống nhau dẫn đến ko unique đc bảng refresh

JWT nó tính theo giây, trường hợp tạo ra cùng 1 token là khi 2 thiết bị dùng chung 1 account và cùng request tại 1 thời điểm (chênh lệch dưới 1s).

Vì thế mọi người nên thêm 1 uuid random vào payload như bạn này nói để đảm bảo refresh token tạo ra unique

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