Skip to content

fix(auth): harden oauth and admin management flows#2

Open
Menstear wants to merge 6 commits into
quipu-uos:developfrom
Menstear:codex/bo-auth-impl
Open

fix(auth): harden oauth and admin management flows#2
Menstear wants to merge 6 commits into
quipu-uos:developfrom
Menstear:codex/bo-auth-impl

Conversation

@Menstear
Copy link
Copy Markdown

@Menstear Menstear commented Apr 3, 2026

Changes

  • OAuth 콜백 실패 사유 전달 방식을 개선해 상세 reason이 로그인 화면에 정확히 반영되도록 수정했습니다.
  • 초대 수락/재발급/취소 플로우의 동시성 및 입력 검증을 강화했습니다.
  • refresh rotation/reuse detection/logout 감사 로그 처리의 정합성을 보강했습니다.
  • 관리자 사용자/초대 API에 pagination, 타입 검증, 정책 가드를 추가했습니다.
  • 관리자 패널 화면과 API 연동(사용자/초대 관리)을 추가하고 UX를 개선했습니다.

Implementation

  • 백엔드
    • /bo/auth/google/callback에 passport 커스텀 콜백을 적용해 info.message 기반 reason 전달을 구현했습니다.
    • googleStrategy에서 invite pre-check 및 트랜잭션 내 원자적 consume(findOneAndUpdate)를 적용했습니다.
    • boAuth에서 refresh 분산락 상태 분기, race/reuse 처리 보완, logout 트랜잭션+감사로그를 적용했습니다.
    • boAdminUsers/boAdminInvites에 ObjectId/boolean/labels/perm 검증과 pagination 응답을 추가했습니다.
    • CORS/CSRF 허용 오리진 파싱을 config/allowedOrigins.js로 공통화했습니다.
    • 감사로그 모델에 append-only 보장을 강화했습니다.
  • 프론트엔드
    • /admin 라우트와 RequireSuperAdmin 가드를 추가했습니다.
    • AdminPanel에서 사용자/초대 관리 UI, 상태 필터, 페이지네이션, 재발급/취소 액션을 구현했습니다.
    • write/all 편집 시 권한 소실 이슈를 방지하도록 모달 라벨 전개 로직을 적용했습니다.
    • createdUrl 출처를 구분(created/reissued)해 배너 문구 혼동을 해소했습니다.
    • AuthProvider/authClient의 BroadcastChannel 정리 및 logout reason 동기화를 개선했습니다.
    • RequireAuth + AuthCallback에서 로그인 후 원래 경로 복귀를 지원했습니다.
    • toastUtil에서 confirm 액션 예외 발생 시에도 토스트가 닫히도록 try/finally를 적용했습니다.

Notes

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.

tighten oauth and invite concurrency handling, strengthen refresh and logout audit consistency, add strict admin API validation, and improve admin panel ux with pagination and clearer invite actions
@Menstear Menstear changed the title feat(auth): implement bo auth specification (#7) fix(auth): harden oauth and admin management flows May 1, 2026
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