[ARCHIVED 2026-08-19] 역사 자료 — 현행 규범이 아니다. 아카이브 사유와 대체 문서는 docs/README.md의 Archive 섹션을 참조.
iOS MacBook Handoff
이 문서는 Windows에서 수정한 Barbelic iOS 셸을 Mac/Xcode에서 최종 검증하기 위한 현재 handoff다. 과거 Kakao 전용 Vercel OAuth 함수는 폐기되었다.
Current architecture
- WebView origin:
BARBELIC_SERVER_ORIGIN(https://www.barbelic.com) - Supabase Auth origin:
BARBELIC_SUPABASE_AUTH_ORIGIN - callback:
barbelic://auth/callback - providers: Kakao, Google, Apple
- OAuth: Supabase PKCE +
ASWebAuthenticationSession - native capability:
socialAuthV1
웹 로그인은 signInWithOAuth, 로그인 방식 추가는 linkIdentity가 만든 authorize URL과 action/provider/transaction ID를 iOS에 전달한다. iOS는 로그인일 때 정확한 Supabase origin의 /auth/v1/authorize와 S256 challenge를, 연결일 때 provider별 공식 authorize endpoint와 Supabase /auth/v1/callback redirect를 검증한 뒤 외부 인증 세션을 연다.
callback은 다음처럼 token 대신 일회성 code만 포함한다.
barbelic://auth/callback?auth_action=sign-in&provider=apple&transaction_id=<base64url>&code=<one-time-code>iOS가 action/provider/transaction을 10분 TTL로 검증·소비한 후 WebView에 전달하면 웹이 exchangeCodeForSession(code)를 호출한다. refresh session은 device-bound Keychain item에 보관한다.
Mac steps
git fetch origin
git switch <auth-branch>
npm ci
npm run check
npm run build
npm run ios:sync
npm run ios:openXcode에서 barbelic shared scheme을 선택하고 다음을 확인한다.
Apptarget의 Team과 Bundle Identifiercom.dekerd.barbelic- URL Types에
barbelic - Debug/Release build setting의 server 및 Supabase auth origin
MainViewController.swift컴파일- 실제 iPhone에서 Kakao, Google, Apple 각각 로그인·취소·재로그인
- 앱 종료 후 Keychain session 복원
- callback에 access/refresh/ID token이 노출되지 않음
- iframe 및 다른 origin의
barbelicNative메시지가 거부됨
External prerequisites
Supabase Dashboard에서 세 provider가 활성화되어야 한다. Google Cloud OAuth client와 Apple Developer Services ID/key/secret은 저장소 밖에서 준비한다. Apple client secret 만료일은 6개월 이내로 운영 일정에 등록한다.
현재 개인정보처리방침 v1과 v2는 Kakao만 명시하므로 Google/Apple production 활성화 전에 법적 검토된 v3 게시와 필요한 사용자 동의 전환이 완료되어야 한다.
상세 계약은 social-auth.md, contracts/native-bridge.md, ios-setup.md를 따른다.