Skip to content

feat(auth): implement bo auth specification (#7)#2

Open
Menstear wants to merge 4 commits intoquipu-uos:developfrom
Menstear:codex/bo-auth-impl
Open

feat(auth): implement bo auth specification (#7)#2
Menstear wants to merge 4 commits intoquipu-uos:developfrom
Menstear:codex/bo-auth-impl

Conversation

@Menstear
Copy link
Copy Markdown

@Menstear Menstear commented Apr 3, 2026

Changes

  • Google OAuth 로그인 플로우에 state 검증 및 콜백 검증 로직을 추가했습니다.
  • AuthCode 모델과 /bo/auth/token-exchange를 도입해 인증 완료 후 단기 코드 교환 방식으로 세션을 연결했습니다.
  • Refresh rotation 로직에 트랜잭션을 적용하고, 재사용 감지(reuse detection) 및 예외 코드를 정리했습니다.
  • 관리자 라우터를 사용자/초대로 분리하여 경로 중복 노출 문제를 제거했습니다.
  • 초대 API(조회/생성/폐기/재발급)와 감사 로그 적재를 반영했습니다.
  • 프론트 인증 클라이언트에서 다중 탭 로그아웃 동기화(BroadcastChannel)를 반영했습니다.

Implementation

  • 백엔드:
    • OAuth: state cookie 검증, invite 연계 로그인, token exchange
    • 토큰: refresh revoke + new issue 원자 처리, reuse 감지 시 대응
    • 권한: requireAuth/requirePerm 기반 write API 보호
    • 관리자: /bo/admin/users, /bo/admin/invites 라우트 분리
    • 감사: audit log 적재 및 append-only 정책
  • 프론트엔드:
    • auth bootstrap/refresh 처리 정리
    • logout 시 탭 간 동기화 보강
    • callback 실패 사유 매핑 보완
  • 문서:
    • appendix에 AuthCode 기반 플로우 및 운영 메모 보완

Notes

  • 단일 이슈-단일 PR 원칙으로 작성했습니다.
  • 배포 환경에서 Redis/멀티 인스턴스 구성값은 운영 설정과 함께 최종 점검이 필요합니다.

Closes #7

a123 added 4 commits March 22, 2026 23:50
apply oauth state validation and authcode exchange flow, enforce refresh rotation atomicity with transaction and reuse detection, split admin users/invites routes, protect write routes with auth/perm checks, and align frontend auth sync behavior

Refs #7
@Menstear Menstear requested a review from i2na as a code owner April 3, 2026 16:19
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

Deployment failed with the following error:

There is no GitHub account connected to this Vercel account.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

Someone is attempting to deploy a commit to the quipu-app Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant