App Distribution 빌드 구글 로그인 실패 수정 (internal 서명 키 고정) - #53
Merged
Conversation
internal buildType 이 debug 서명을 쓰는데 CI 러너에는 debug 키스토어가 없어 AGP 가 빌드마다 새 키를 생성했다. 서명 SHA-1 이 매 실행 달라지니 구글 로그인용 Android OAuth 클라이언트로 등록할 수가 없어 Credential Manager 요청이 실패했다. (실제 배포 APK 확인: run 32130123521 -> 172bef8e..., run 32093393961 -> 2205192f...) release 키스토어 env 가 주어지면 그 고정 키로 internal 을 서명하도록 바꾸고, CD 의 firebase-distribution 잡에 키스토어 복원 + 서명 env 전달을 추가했다. 이 키의 SHA-1(fd46eb66...)은 이미 Firebase 에 등록돼 있어 콘솔 작업은 필요 없다. env 가 없는 로컬 빌드는 기존대로 debug 서명으로 폴백한다.
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.
작업 개요
App Distribution으로 배포된 빌드에서 구글 로그인이 되지 않던 문제를 수정했습니다.
internalbuildType이 debug 서명을 쓰는데, CI 러너에는~/.android/debug.keystore가 없어 AGP가 빌드마다 새 debug 키를 생성합니다. 그래서 배포되는 APK의 서명 SHA-1이 매 실행 달라지고, 구글 로그인용 Android OAuth 클라이언트로 등록 자체가 불가능한 상태였습니다. Credential Manager는 패키지명 + 서명 SHA-1이 등록돼 있어야 토큰을 내주므로 로그인이 항상 실패합니다.실제 배포 산출물로 확인한 서명 SHA-1:
두 값 모두 Firebase에 등록된 지문 목록에 없고, 실행마다 달라서 "이번 값만 등록" 같은 대응도 불가능합니다. (google-services.json 최신화로는 해결되지 않는 문제입니다.)
internal을 CD의 release 키스토어로 서명하도록 바꿨습니다. 이 키의 SHA-1(fd46eb66...)은 이미com.gamss.android에 등록돼 있어 콘솔 작업은 필요 없습니다.작업 유형
변경 사항
app/build.gradle.kts
internalbuildType의 signingConfig를 조건부로 바꿨습니다. release 키스토어 env 4종이 모두 있으면 그 키로 서명하고, 없으면(로컬) 기존대로 debug로 폴백합니다..github/workflows/cd.yml
firebase-distribution잡에 release 키스토어 복원 스텝과 서명 env 전달을 추가했습니다.play-release-aab잡이 이미 쓰는 것과 동일한 시크릿이라 새로 등록할 시크릿은 없습니다.검증
:app:signingReport로 두 경로를 확인했습니다 (env 주입 시엔 테스트용 임시 키스토어 사용).release/debug변이의 서명은 변화 없습니다.머지 후 CD가 배포한 APK에서
apksigner verify --print-certs로fd46eb66...인지 확인하고 실제 로그인까지 봐주시면 완결됩니다.관련 이슈
스크린샷 / 동작 화면
UI 변경 없음
체크리스트
develop으로 설정되어 있다feat:,fix:등)을 따른다리뷰 요청 사항
Play Console 배포본은 구글이 재서명하므로(Play App Signing) 스토어 빌드의 구글 로그인에는 별도의 인증서 지문 등록이 필요합니다. 이 PR 범위 밖이지만 스토어 배포 전에 확인이 필요합니다.