Athentication session & Application session
dev.to·5h·
Discuss: DEV

🧩 Big Picture

There are two types of sessions in a web app:

  1. Authentication session (Cognito, tokens)
  2. Application session (DynamoDB, Redis, etc.) They interact, but they serve different layers of your application.

🔹 1️⃣ Authentication session — “Who is this user?”

  • Managed by Amazon Cognito (or another identity provider).
  • Exists to prove the user’s identity.
  • Represented by JWT tokens (ID, access, refresh).
  • Has a limited lifetime (e.g., 1 hour access token, 30-day refresh token).
  • Stored on the client (browser/app), usually in cookies or local storage. 💡 Purpose: Security and authorization.

🔹 2️⃣ Application session — “What is this user doing?”

  • Managed by your application backend.
  • Stored i…

Similar Posts

Loading similar posts...