Skip to content

Auth Module

Mục đích

Quản lý luồng xác thực người dùng cuối: đăng nhập email, đăng ký, quên mật khẩu và quản lý session. Đây là cửa vào công khai của ứng dụng.

Quy mô

  • 4 FE pages
  • 3 FE components
  • 1 GraphQL file
  • 1 nhóm nghiệp vụ chính

Actors & Permissions

Nhóm chức năngScope
Public authenticationKhông yêu cầu route permission nội bộ
Logged-in profileQuery profile.graphql phục vụ trạng thái người dùng

Feature Groups

GroupPages
Authentication FlowEmailLogin.tsx, Register.tsx, ForgotPassword.tsx, LoginSession.tsx

Liên kết Modules

  • user — hồ sơ account sau đăng nhập
  • notification — reset password / OTP / session-related messaging
  • homepage — landing entry sau khi user đăng nhập

Backend Services

ServiceVai trò
authLogin/profile/password/OTP/merge account actions
controller (Hasura)Profile query, account metadata

Databases

DBKey tables
defaultaccount, provider/session-related metadata

Đặc điểm kiến trúc

  • Module FE rất mỏng; phần lớn business logic auth nằm ở service auth.
  • Có cả LoginSession cho thấy hệ thống theo dõi session song song với đăng nhập chuẩn.
  • configureUseAuth.tsuseProfile.ts là điểm nối giữa route công khai và trạng thái account runtime.