Back to Authentication
HIGHHappy Path

Session Management

Verify JWT token-based session management including token refresh and logout functionality. Tests the complete session lifecycle.

8 steps
~4 min
auth-6

Preconditions

  • You have valid login credentials for an existing account
  • You are not currently logged in

Test Data

Use credentials from a verified account.

Test Steps

Follow each step carefully

0/8

Login with valid credentials

Location

Complete the login flow (auth-2)

Verify

Login succeeds and JWT tokens are returned

Note

Both access token and refresh token should be stored

Verify tokens are stored (check browser dev tools)

Location

Open browser dev tools > Application > Local Storage or Cookies

Verify

Access token and refresh token are present

Note

Tokens may be in localStorage, sessionStorage, or HTTP-only cookies

Access a protected route or API endpoint

Location

Navigate to dashboard or any authenticated page

Verify

Protected content is accessible

Wait for access token to expire or manually trigger refresh

Location

Access tokens typically expire in 5-15 minutes

Verify

Application automatically refreshes token using refresh token

Note

Verify the refresh happens transparently without user interaction

Verify you can still access protected routes after token refresh

Location

Continue using the application normally

Verify

Application continues to work without requiring re-login

Click the logout button

Location

Usually in user menu or navigation

Verify

Logout confirmation or redirect to login page

Verify tokens are invalidated after logout

Location

Check browser dev tools again

Verify

Tokens are removed from storage

Attempt to access a protected route after logout

Location

Try to navigate directly to a dashboard URL

Verify

User is redirected to login page or access is denied

Expected Result

Session management works correctly: (1) Login returns both access and refresh tokens, (2) Access token is used for API authentication, (3) Refresh token successfully obtains new access token when needed, (4) Logout invalidates all tokens, (5) Protected routes are inaccessible after logout, (6) Attempting to use old tokens fails.

Ready to Complete?

Click when you have verified all steps and the expected result.

Test Info

Module
Authentication
Steps
8
Duration
4 min
XP Value
+30