Skip to content

English {#english}

Purpose: Verify the “forgot passcode” flow in production: forgot-passcode → email link → reset-passcode → login. Requires Auth Worker CLIENT_WEB_BASE_URL, ZUPLO_EMAIL_API_*, and client-web NEXT_PUBLIC_API_URL. Checklist: (1) BASE_URL matches production, (2) forgot-passcode returns 200, (3) reset email received with .../reset-passcode?token=..., (4) link opens reset page, (5) POST /auth/passcode/reset with token and 6-digit passcode returns 200 and Set-Cookie, (6) redirect to attendance. Ref: otp-verify-and-passcode-flow-check-plan §4.2.

flowchart LR
  A[Forgot passcode] --> B[Email with link]
  B --> C[Click link]
  C --> D[Reset passcode page]
  D --> E[POST /auth/passcode/reset]
  E --> F[Redirect to attendance]

Full details: see Korean section below.


한국어 {#korean}

Runbook: Passcode 재설정 플로우 검증 (request-reset → reset-passcode)

목적: “비밀번호(패스코드)를 잊었을 때” 플로우 — forgot-passcode → 이메일 링크 → reset-passcode → 로그인 완료 — 가 상용에서 동작하는지 확인할 때 참고.
참조: otp-verify-and-passcode-flow-check-plan §4.2, §4.2.1, §4.2.2.


1. 필요한 환경·설정

대상변수/설정설명
Auth WorkerCLIENT_WEB_BASE_URL재설정 이메일 링크의 베이스 URL (예: https://x.pregoi.com). 링크는 {BASE_URL}/{slug}/reset-passcode?token=... 형태.
Auth WorkerZUPLO_EMAIL_API_URL, ZUPLO_EMAIL_API_KEY설정되어 있어야 재설정 이메일이 발송됨. 미설정 시 request-reset은 200이지만 이메일 미발송.
client-webNEXT_PUBLIC_API_URL상용 Zuplo Gateway URL. reset-passcode 페이지가 POST /auth/passcode/reset 호출 시 사용.

2. 검증 체크리스트 (실테스트)

기획서 §4.2.2와 동일. 요약:

  1. CLIENT_WEB_BASE_URL — 상용 클라이언트 도메인·경로와 일치하는지 확인.
  2. forgot-passcode — 이메일 제출 시 200, “If an account exists…” 표시.
  3. 이메일 수신 — 재설정 링크 이메일 수신, 링크가 .../reset-passcode?token=... 형태.
  4. 링크 클릭 — 해당 slug/경로의 reset-passcode 페이지 로드, token 쿼리 유지.
  5. POST /auth/passcode/reset — token·passcode(6자리) 전송, 200, Set-Cookie, redirect_url 수신.
  6. 리다이렉트 — 성공 후 attendance(또는 의도한 페이지)로 이동.

3. 참고

  • redirect_url: Auth Worker는 redirect_url: /${slug}/attendance 를 반환 (locale 없음). client-web reset-passcode 페이지는 성공 시 현재 경로의 lang을 넣어 /${slug}/${lang}/attendance 로 이동하도록 보정함.
  • 검증 결과 정리: 실테스트 후 기획서 §7에 “Passcode 플로우 확인 결과”를 기록.
Help