Skip to content

[LOCKLITE-115] Create an Auth Guard in UI#75

Merged
vbetsch merged 9 commits intodevelopfrom
ui/feat/115-auth-guard
Aug 6, 2025
Merged

[LOCKLITE-115] Create an Auth Guard in UI#75
vbetsch merged 9 commits intodevelopfrom
ui/feat/115-auth-guard

Conversation

@vbetsch
Copy link
Owner

@vbetsch vbetsch commented Aug 6, 2025

No description provided.

@vbetsch vbetsch requested a review from Copilot August 6, 2025 22:56
@vbetsch vbetsch self-assigned this Aug 6, 2025
@vbetsch vbetsch added ui About templating and styling auth About register, login, logout, profile routes and pages labels Aug 6, 2025
@notion-workspace
Copy link

Copy link
Contributor

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 creates an authentication guard system for the UI to control access to protected pages. The main purpose is to implement route-based authentication where certain pages require users to be logged in.

  • Introduces an AuthGuard component that redirects unauthenticated users to sign in
  • Refactors layout structure by extracting PageLayout from ClientProviders for better separation of concerns
  • Updates import paths for PageContainer component that was moved to the templates directory

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/modules/ui/guards/AuthGuard.tsx New auth guard component that checks session status and handles authentication
src/app/ui/workspace/layout.tsx New workspace layout that wraps children with the AuthGuard
src/modules/ui/components/templates/PageLayout.tsx Extracted layout component containing MainNavBar and Container
src/modules/ui/providers/ClientProviders.tsx Simplified to only provide theme and session context
src/app/ui/layout.tsx Updated to use the new PageLayout component
src/modules/ui/components/auth/molecules/SignInForm.tsx Enhanced error handling to check URL search params for authentication errors
src/modules/ui/components/navigation/organisms/MainNavBar.tsx Updated to use SessionStatus enum instead of string literal
src/app/ui/login/page.tsx Removed redundant SessionProvider wrapper
src/app/ui/workspace/page.tsx Updated import path for PageContainer
tests/units/modules/ui/components/common/PageContainer.test.tsx Updated import path for PageContainer

@vbetsch vbetsch merged commit 43b14bc into develop Aug 6, 2025
4 checks passed
@vbetsch vbetsch deleted the ui/feat/115-auth-guard branch August 6, 2025 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth About register, login, logout, profile routes and pages ui About templating and styling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants