Skip to content

Conversation

@AditiChikkali
Copy link
Contributor

@AditiChikkali AditiChikkali commented Nov 4, 2025

  • Added user authentication system with JWT tokens
  • Added login/logout functionality with protected routes
  • Implemented automatic token refresh before expiration
  • Configured axios interceptors to automatically attach auth headers

@AditiChikkali AditiChikkali requested a review from Copilot November 4, 2025 17:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements authentication functionality for the Tiled web frontend, adding JWT-based authentication with session management, login/logout capabilities, and protected routes.

Key Changes

  • Added authentication system with JWT token management, including automatic token refresh and session handling
  • Created login page and protected route components for access control
  • Integrated authentication interceptors into the Axios client for API requests

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
web-frontend/vite.config.js Added dotenv support and updated proxy configuration with security settings
web-frontend/src/settings.ts Added getApiBaseUrl function and error handling for settings fetch
web-frontend/src/client.ts Added auth interceptors, token refresh logic, and URL transformation utilities
web-frontend/src/components/tiled-app-bar/tiled-app-bar.tsx Refactored to support authentication with login/logout buttons
web-frontend/src/components/tiled-app-bar/tiled-app-bar.test.tsx Updated tests to mock auth context
web-frontend/src/components/protected-route.tsx New component for protecting routes requiring authentication
web-frontend/src/components/login-page/login-page.tsx New login page component with form validation
web-frontend/src/components/login-page/login-page.test.tsx Tests for login page component
web-frontend/src/components/download-core/download-core.tsx Added commented import for URL helper
web-frontend/src/auth/types.ts New TypeScript type definitions for auth system
web-frontend/src/auth/token-manager.ts New token storage and expiry management
web-frontend/src/auth/auth-provider.tsx New auth context provider with state management
web-frontend/src/auth/auth-context.tsx New auth context definition
web-frontend/src/auth/auth-api.ts New API service for authentication endpoints
web-frontend/src/App.tsx Integrated AuthProvider and updated routing structure
web-frontend/package.json Added dotenv dependency
Files not reviewed (1)
  • web-frontend/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

web-frontend/src/client.ts:1

  • Unnecessary try-catch block that simply re-throws the error. Remove this block and directly return the result of the operations.
import axios from "axios";

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AditiChikkali AditiChikkali marked this pull request as ready for review November 13, 2025 18:25
@danielballan danielballan mentioned this pull request Nov 13, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants