로그인 페이지 및 인증 로직 추가 - #22
Merged
Merged
Conversation
로그인 페이지 및 인증 로직 추가
There was a problem hiding this comment.
Pull request overview
Adds a login screen and a minimal client-side “auth” mechanism to gate routes in the admin/user web apps, backed by shared utilities in @commonly/utils and a reusable Login component in @commonly/ui.
Changes:
- Introduce
@commonly/utilsauth helpers for storing/clearing an auth token, remembering login IDs, and sanitizing redirect paths. - Add a new
LoginUI component and wire/loginroutes plus auth-required loaders in bothadmin-webanduser-web. - Add logout handling in layouts; remove the existing
packages/uiintegrated-registration regression test file.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/utils/src/index.ts | Re-export auth helpers/types from the utils entrypoint. |
| packages/utils/src/auth.ts | Implements localStorage-backed token + remembered ID helpers, redirect path sanitizer, and local session token generator. |
| packages/utils/src/.gitkeep | Keeps the directory tracked (now redundant with real source files present). |
| packages/utils/package.json | Adds bun test script for utils package. |
| packages/ui/tests/integratedRegistration.test.tsx | Removes existing UI regression tests for integrated registration + header. |
| packages/ui/src/login/Login.tsx | New login page component (form validation + submit handling). |
| packages/ui/src/login/login.styles.ts | Styling for the login page component. |
| packages/ui/src/index.ts | Exposes Login component/types from the UI package. |
| bun.lock | Adds workspace dependency links for @commonly/utils. |
| apps/user-web/src/router/index.tsx | Adds /login route + auth-required loader redirecting unauthenticated users. |
| apps/user-web/src/pages/LoginPage.tsx | Implements login behavior (store token, remember ID, navigate to sanitized redirect). |
| apps/user-web/src/layout/UserLayout.tsx | Adds default logout handler (confirm → clear token → navigate to /login). |
| apps/user-web/package.json | Adds @commonly/utils dependency. |
| apps/admin-web/src/router/index.tsx | Same auth-required loader + /login route as user-web. |
| apps/admin-web/src/pages/LoginPage.tsx | Same login behavior as user-web. |
| apps/admin-web/src/layout/AdminLayout.tsx | Adds default logout handler (confirm → clear token → navigate to /login). |
| apps/admin-web/package.json | Adds @commonly/utils dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yunho09
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
로그인 페이지 및 인증 로직 추가