Skip to content

Conversation

@vvan2
Copy link
Member

@vvan2 vvan2 commented Sep 17, 2025

ISSUE

❗ WORK DESCRIPTION

  • google login 세팅 했습니다 (api 및 뷰 확정되면 연결하면서 수정사항 반영하겠습니다.)
  • homeservice 파편화 , 네이밍 변경
  • util.noRipple => ext.noRipple 사용하는 곳 package 변경했습니다.

📸 SCREENSHOT

BEFORE AFTER

📢 TO REVIEWERS

  • google 버전 카탈로그 확인한번 부탁드립니다.
  • 위에 말한 package랑 homenavigation에 저번 pr이 반영이 안 된것 같아서 오류 뜨는 부분 임시로 해결했습니다

@vvan2 vvan2 self-assigned this Sep 17, 2025
@vvan2 vvan2 added feature ✨ 새로운 기능 구현 🐻주완 주완 전용 라벨 labels Sep 17, 2025
@vvan2 vvan2 linked an issue Sep 17, 2025 that may be closed by this pull request
1 task
@github-actions github-actions bot requested a review from JiWoo1261 September 17, 2025 11:57
@vvan2 vvan2 requested a review from sonms September 17, 2025 11:58
Copy link
Member

@sonms sonms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~! 홧팅홧팅

Comment on lines 35 to 38
// 토큰 관리를 위한 키들
private val ACCESS_TOKEN_KEY = stringPreferencesKey("access_token")
private val REFRESH_TOKEN_KEY = stringPreferencesKey("refresh_token")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

access token과 refresh token은 평문으로 저장할 경우 보안에 문제가 생길 수 있으니 EncryptedSharedPreferences 을 사용해서 암호화해서 저장해보는 것은 어떨까 싶습니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니두

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 더 찾아보니 Tink라는 구글의 암호화 라이브러리를 사용하는 것이 더 좋아보이네요! 현재 EncryptedSharedPreferences는 보안 취약점이 있기도 했고, 개발도 중단 된 거 같네요.. Tink 관련해서는 Medium에서 확인해보시면 좋을 것 같습니다! 래퍼런스가 많이 없긴한데 편하신 걸로 구현하시면 될 것 같습니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 EncryptedSharedPreferences 로 작업하고 있긴했는데, Tink 로 한 번 적용해서 구현해보겠습니다. 자료감사합니당

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

취소.. 참조할만한 자료가 마땅치않네용 나중에 마이그레이션하던지 합시당

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
isCoreLibraryDesugaringEnabled = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

v2All = "2.20.1"

# Google
credentials = "1.6.0-alpha03"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alpha 버전 보단 원체 credential이 오류가 많은 친구라 안정화 버전을 씁시당 1.5.0으로 변경해주세요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵!

}


class AuthRemoteDataSourceImpl @Inject constructor(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

google은 google sdk 관련 책임과 역할로, AuthRemoteDataSourceImpl는 우리 백엔드와 관련된 책임과 역할이기 때문에 분리해주시면 더 좋을 것 같습니다! google sdk에서 우리 백엔드 연결 방식을 전혀 몰라야겠지요?

Comment on lines 8 to 14
interface GoogleAuthDataSource {
suspend fun signIn(context: Context): Result<GoogleIdTokenCredential>
}

interface AuthRemoteDataSource {
suspend fun login(providerToken: String, provider: String): BaseResponse<LoginResponseDto>
} No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 책임과 역할에 맞게 각자 분리~



interface LoginService {
@POST("api/v1/auth/login")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저희 아마 api/v1까지라서 auth/login 까지만 사용하시면 됩니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주말에 백엔드분들께 전달받으면 바로 수정하겠습니다!


interface AuthRepository {
suspend fun signInWithGoogle(context: Context): Result<String>
suspend fun login(providerToken: String, provider: String): Result<LoginResponseDto>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dto는 여기서 사용하는게 아니죵? 다시 한 번 확인해보고 presentation -> domain -> data의 의존성을 확인하고 domain의 repository를 통해 presentation의 viewmodel에 의존성을 주입 받을 때를 생각해봅시다!

@Composable
fun TrackingCard(
onClick: () -> Unit,
modifier: Modifier = Modifier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

상위에서 modifier를 받았는데 아래에 최상위 컴포저블에 modifier는 여전히 Modifier를 사용하는 것 같은데 확인 부탁드려요~

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 pull 받았을때 오류나서 일단 수정해놓긴했는데, 한번더 확인해보겠습니다

Comment on lines 108 to +109
try {
val result = regionCurrentRepository.RegionCurrent(userId.first())
val result = regionCurrentRepository.regionCurrent(userId.first())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Result를 사용해서 구현했으니 try-catch문을 제거하고 중복된 코드를 제거해도 좋을 것 같아요!

Comment on lines 16 to 20
val state: StateFlow<LoginContract.LoginState>
get() = _state.asStateFlow()

private val _sideEffect = MutableStateFlow<LoginContract.LoginSideEffect?>(null)
val sideEffect : StateFlow<LoginContract.LoginSideEffect?>
val sideEffect: StateFlow<LoginContract.LoginSideEffect?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아직 LoginContract가 {}로 묶여있는 거 같은데 여유있으실 때 없애주시면 좋을 것 같아요~!

Copy link
Collaborator

@JiWoo1261 JiWoo1261 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고햇더염

@vvan2 vvan2 merged commit 6698021 into develop Sep 22, 2025
@vvan2 vvan2 deleted the feat/#135-google-login branch September 22, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature ✨ 새로운 기능 구현 🐻주완 주완 전용 라벨

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] Google 로그인 연동

4 participants