簡單統整 JWT 相對於傳統 Session 驗證的好處

  • Server 不用存 Session
  • 只有在 Client 拿新 JWT 時才需要跟 DB 溝通
    • Clent 拿的時機:JWT 到期或第一次拿
    • 為何不需跟 DB 溝通?
      • 因為 JWT 裡已有所需資訊
      • 但假如業務需求需要另外取敏感資訊的話還是需要碰 DB
  • 參考
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×