Skip to content

feat(auth): User Login - #470

Merged
zigzagdev merged 26 commits into
mainfrom
feat/user-login
Jul 28, 2026
Merged

zigzagdev merged 26 commits into
mainfrom
feat/user-login

Conversation

@zigzagdev

@zigzagdev zigzagdev commented Jul 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add login/logout/getCurrentUser to the auth API client (Bearer token auth, Sanctum-style {status,data} envelope)
  • Add toLoginRequest mapper, useLogin/useLogout hooks, and shared AuthProvider/useAuth/token storage
  • Add LoginForm and LoginContainer, wired to /login; on success navigates to /mypage
  • Add RequireAuth (redirects to /login when unauthenticated) and wire it around /mypage only — /heritages and other public routes stay open to unregistered users
  • /mypage shares the exact same profile view/edit/delete implementation as /users/:id via a new UserProfileContainer (accepts id as a prop): UserGetContainer passes the route param's id, MyPageContainer passes the authenticated user's own id from useAuth(). No URL redirect — /mypage stays /mypage
  • Add login/loginError/logout i18n keys (en/ja)
  • Manually verified in the browser: create a user → log in → redirected to /mypage showing that user's own profile

Test plan

  • npx tsc --noEmit
  • npx jest (206 tests)
  • npm run build
  • npm run format:check
  • npm run lint
  • Manually verified in the browser

zigzagdev added 26 commits July 19, 2026 11:39
feat(user-login): merge into Login Frontend
feat(auth): add login request mapper
feat(auth): add useLogin/useLogout hooks
# Conflicts:
#	client/src/app/routes/AppRoutes.tsx
#	client/src/locals/en/ui.json
#	client/src/locals/ja/ui.json
…e-container

feat: share UserProfileContainer between /mypage and /users/:id
@zigzagdev zigzagdev self-assigned this Jul 28, 2026
@zigzagdev zigzagdev linked an issue Jul 28, 2026 that may be closed by this pull request

@zigzagdev zigzagdev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

@zigzagdev
zigzagdev merged commit 929e4e2 into main Jul 28, 2026
1 check passed
@zigzagdev
zigzagdev deleted the feat/user-login branch July 28, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Userログイン

1 participant