feat(gate): 게이트 인증을 DataClinic Firebase 실연동으로 교체 - #967
Open
joohaeng-pbls wants to merge 2 commits into
Open
Conversation
소프트 게이트의 스텁 인증(sessionStorage)을 실제 DataClinic Firebase (pbls-dataclinic-prod)로 교체. 블로그에서 가입/로그인 = DataClinic 회원. - ensureFirebase(): 게이트 페이지에서만 gstatic CDN 으로 firebase-app/auth compat SDK 를 지연 로드하고 initializeApp. 비게이트 글은 SDK 안 받아 무게 0. - AUTH: signInWithEmailAndPassword / createUserWithEmailAndPassword / signInWithPopup(Google). 클릭 시 SDK 로드 보장. - applyGate: onAuthStateChanged 로 이미 로그인한 회원이면 게이트 자동 해제. - config 는 gated.json 의 firebase 필드에서 읽는다(공개 웹 config — 코드/데이터 분리). gatedPaths 는 [] 유지 → 배포해도 아무 글 안 잠김(Firebase 검증 전 안전). 검증(로컬 서빙, 실제 글): - Firebase SDK 로드 + initializeApp(projectId=pbls-dataclinic-prod) + auth() 사용가능 - 로그인 호출이 실제 Firebase 인증서버까지 왕복 → 존재하지 않는 계정에 대해 auth/invalid-credential 반환 확인(계정 생성 없음) - node -c 문법 통과, 스텁 잔재 0⚠️ 라이브(blog.pebblous.ai) 동작 전제 — Firebase 콘솔에서: 1) Authentication → Settings → Authorized domains 에 blog.pebblous.ai 추가 2) Sign-in method 에 Email/Password·Google 활성 확인 성공 로그인 테스트는 실제 DataClinic 계정으로(운영 DB에 테스트 계정 안 만듦). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
소프트 게이트의 스텁 인증을 **실제 DataClinic Firebase(
pbls-dataclinic-prod)**로 교체합니다. 이제 블로그에서 가입/로그인하면 진짜 DataClinic 회원이 됩니다.변경
ensureFirebase()— 게이트 페이지에서만 gstatic CDN으로 firebase-app/auth compat SDK를 지연 로드 +initializeApp. 비게이트 글은 SDK를 안 받아 무게 0.signInWithEmailAndPassword/createUserWithEmailAndPassword/signInWithPopup(Google). 클릭 시 SDK 로드 보장.applyGate—onAuthStateChanged로 이미 로그인한 회원이면 게이트 자동 해제.gated.json의firebase필드에서 읽음(공개 웹 config, 코드/데이터 분리).gatedPaths는[]유지.검증 (로컬 서빙, 실제 글
physical-ai/ko/)projectId = pbls-dataclinic-prodfirebase.auth()auth/invalid-credential(실제 Firebase 응답, 계정 생성 없음)성공 로그인은 실제 DataClinic 계정이 필요해 로컬에서 안 돌렸습니다(운영 DB에 테스트 계정 안 만듦).
blog.pebblous.ai에서 작동하려면 pbls-dataclinic-prod 프로젝트에서:blog.pebblous.ai추가(없으면 라이브에서
auth/unauthorized-domain. localhost는 기본 허용)배포 안전성
gatedPaths: []라 머지·배포해도 아무 글도 안 잠깁니다. 인증만 실연동으로 바뀌고, 실제 게이팅은 (승인 도메인 추가 + gated.json에 경로 넣기) 이후에 시작됩니다.남은 것
/admin/gating(글 on/off UI) — 별도 PR🤖 Generated with Claude Code