-
Notifications
You must be signed in to change notification settings - Fork 0
[Feature/#3] kakao login sdk #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
""" Walkthrough์นด์นด์ค ๋ก๊ทธ์ธ์ ์ํ SDK ์ฐ๋ ๋ฐ OAuth ๊ธฐ๋ฅ์ด ์ ๊ท๋ก ์ถ๊ฐ๋์์ต๋๋ค. ์นด์นด์ค SDK ์์กด์ฑ, ๋ค์ดํฐ๋ธ ํค์ ๋น๋/๋งค๋ํ์คํธ ์ฐ๋, OAuth ์ ์ฉ feature ๋ชจ๋, OAuth ๋ค๋น๊ฒ์ด์ ๋ฐ ํ๋ฉด, ViewModel๊ณผ ์ํ ๊ด๋ฆฌ, ์นด์นด์ค ๋ก๊ทธ์ธ ํ๋ก์ฐ ์ฝ๋๊ฐ ํฌํจ๋์์ต๋๋ค. ๊ธฐ์กด ๋ค๋น๊ฒ์ด์ ์ง์ ์ ๋ OAuth๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OauthScreen
participant OauthViewModel
participant KakaoSDK
User->>OauthScreen: "Oauth" ํด๋ฆญ
OauthScreen->>OauthViewModel: KakaoLoginClick ์ธํ
ํธ ์ ๋ฌ
OauthViewModel->>OauthScreen: StartKakaoLogin ์ฌ์ด๋์ดํํธ ๋ฐํ
OauthScreen->>KakaoSDK: startKakaoLogin() ํธ์ถ
alt KakaoTalk ์ค์น๋จ
KakaoSDK-->>OauthScreen: ๋ก๊ทธ์ธ ์ฑ๊ณต/์คํจ ์ฝ๋ฐฑ
else KakaoTalk ๋ฏธ์ค์น
KakaoSDK-->>OauthScreen: ์นด์นด์ค ๊ณ์ ๋ก๊ทธ์ธ ์ฝ๋ฐฑ
end
OauthScreen->>User: ๊ฒฐ๊ณผ ํ ์คํธ/๋ก๊น
Assessment against linked issues
Poem
๐ Recent review detailsConfiguration used: CodeRabbit UI ๐ Files selected for processing (1)
๐ง Files skipped from review as they are similar to previous changes (1)
โฐ Context from checks skipped due to timeout of 90000ms (1)
๐ชง TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
๐งน Nitpick comments (1)
core/ui/src/main/java/com/teamsolply/solply/ui/lifecycle/LaunchedEffectWithLifecycle.kt (1)
11-18: Composable ํจ์ ์๊ทธ๋์ฒ ๋ฐ ๊ธฐ๋ณธ๊ฐ ์ค์
key1,key2๊ธฐ๋ณธ๊ฐ๊ณผminActiveState๋ฅผSTARTED๋ก ์ค์ ํด ํ์ํ ์์ ์๋ง ์ก์ ์ด ์คํ๋๋๋ก ์ ์ ์ํ์ต๋๋ค. ์ถ๊ฐ ํค ํ์ฅ์ฑ์ด ํ์ํ๋ค๋ฉด vararg ๋ฐฉ์ ๋์ ์ ๊ณ ๋ คํ์ธ์.
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
๐ Files selected for processing (19)
app/build.gradle.kts(1 hunks)app/src/main/AndroidManifest.xml(1 hunks)app/src/main/java/com/teamsolply/solply/SolplyApplication.kt(1 hunks)build-logic/convention/src/main/java/AndroidApplicationPlugin.kt(2 hunks)build-logic/convention/src/main/java/com/teamsolply/solply/convention/BuildConfig.kt(1 hunks)core/buildconfig/src/main/java/com/teamsolply/solply/buildconfig/impl/BuildConfigFieldsProviderImpl.kt(1 hunks)core/common/src/main/java/com/teamsolply/solply/common/buildconfig/BuildConfigFields.kt(1 hunks)core/ui/src/main/java/com/teamsolply/solply/ui/lifecycle/LaunchedEffectWithLifecycle.kt(1 hunks)feature/main/build.gradle.kts(1 hunks)feature/main/src/main/java/com/teamsolply/solply/main/MainNavigator.kt(2 hunks)feature/main/src/main/java/com/teamsolply/solply/main/MainScreen.kt(2 hunks)feature/oauth/.gitignore(1 hunks)feature/oauth/build.gradle.kts(1 hunks)feature/oauth/src/main/AndroidManifest.xml(1 hunks)feature/oauth/src/main/java/com/teamsolply/solply/oauth/navigation/OauthNavigation.kt(1 hunks)feature/oauth/src/main/java/com/teamsolply/solply/oauth/presentation/OauthContract.kt(1 hunks)feature/oauth/src/main/java/com/teamsolply/solply/oauth/presentation/OauthScreen.kt(1 hunks)feature/oauth/src/main/java/com/teamsolply/solply/oauth/presentation/OauthViewModel.kt(1 hunks)settings.gradle.kts(2 hunks)
โฐ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
๐ Additional comments (24)
app/build.gradle.kts (1)
24-25: Kakao ๋ก๊ทธ์ธ SDK ์์กด์ฑ ์ถ๊ฐ ํ์ธ
app๋ชจ๋์libs.kakao.login์์กด์ฑ์ ์ ์ ํ ์ถ๊ฐํด OAuth ๊ธฐ๋ฅ์ ์ฐ๋ํ์ต๋๋ค. ๋ฌธ์ ์์ด ๋ณด์ ๋๋ค.settings.gradle.kts (2)
21-21: Kakao SDK์ฉ Maven ์ ์ฅ์ ์ถ๊ฐ
maven(url = "https://devrepo.kakao.com/nexus/content/groups/public/")๋ฅผdependencyResolutionManagement์ ์ถ๊ฐํด SDK๋ฅผ ์ฌ๋ฐ๋ฅด๊ฒ ๊ฐ์ ธ์ฌ ์ ์๋๋ก ํ์ต๋๋ค.
41-41: OAuth ๋ชจ๋ ํฌํจ ์ฒ๋ฆฌ
include(":feature:oauth")๋ฅผ ๋ฃจํธ ํ๋ก์ ํธ์ ์ถ๊ฐํด OAuth ๋ชจ๋์ ๋น๋ ๋์์ ํฌํจ์์ผฐ์ต๋๋ค.core/ui/src/main/java/com/teamsolply/solply/ui/lifecycle/LaunchedEffectWithLifecycle.kt (2)
3-10: ํ์ํ ๋ผ์ดํ์ฌ์ดํด ๋ฐ Compose ์ํฌํธ ํ์ธ
LaunchedEffect,LocalLifecycleOwner,repeatOnLifecycle๋ฑ ํ์ํ ์ํฌํธ๊ฐ ๋ชจ๋ ์ ์ ํ ์ถ๊ฐ๋์ด ์์ต๋๋ค.
19-24: repeatOnLifecycle ๋ด๋ถ ๋ก์ง ์์ ์ฑ ๊ฒํ
repeatOnLifecycle๋ธ๋ก์์action()์ ํธ์ถํด ๋ผ์ดํ์ฌ์ดํด ์ํ ๋ณํ์ ๋ฐ๋ผ ์์ ํ๊ฒ ์ฝ๋ฃจํด์ ์ฌ์์ํ๋๋ก ๊ตฌํ๋์์ต๋๋ค.feature/oauth/.gitignore (1)
1-1: ๋น๋ ์ํฐํฉํธ ignore ์ค์
/build๋๋ ํ ๋ฆฌ๋ฅผ ๋ฌด์ํด ๋ชจ๋๋ณ ๋น๋ ์ฐ์ถ๋ฌผ์ด ์ปค๋ฐ๋์ง ์๋๋ก ํ์ต๋๋ค.feature/main/build.gradle.kts (1)
10-10: OAuth ๋ชจ๋ ์์กด์ฑ ์ถ๊ฐ
feature/main๋ชจ๋์projects.feature.oauth์์กด์ฑ์ ์ถ๊ฐํด OAuth ๊ธฐ๋ฅ์ ํตํฉํ์ต๋๋ค.feature/oauth/src/main/AndroidManifest.xml (1)
1-4: ์ต์ํ์ ๋งค๋ํ์คํธ ๊ตฌ์ฑ์ด ์ ์ ํฉ๋๋ค.OAuth ํผ์ณ ๋ชจ๋์ ๋งค๋ํ์คํธ๊ฐ ์ต์ํ์ผ๋ก ๊ตฌ์ฑ๋์ด ์์ผ๋ฉฐ, ์ด๋ ํผ์ณ ๋ชจ๋์ ๋ชจ๋ฒ ์ฌ๋ก์ ๋ฐ๋ฅธ ์ฌ๋ฐ๋ฅธ ์ ๊ทผ์ ๋๋ค. OAuth ๊ด๋ จ Activity ๋ฐ ๊ถํ์ ์ฑ ๋ ๋ฒจ ๋งค๋ํ์คํธ์์ ์ฒ๋ฆฌ๋๋ฏ๋ก ์ด ๊ตฌ์ฑ์ด ์ ํฉํฉ๋๋ค.
feature/oauth/build.gradle.kts (1)
1-11: ๋น๋ ๊ตฌ์ฑ์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ค์ ๋์์ต๋๋ค.OAuth ํผ์ณ ๋ชจ๋์ ๋น๋ ๊ตฌ์ฑ์ด ์ ์ ํฉ๋๋ค:
solply.featureํ๋ฌ๊ทธ์ธ ์ ์ฉ- ์ผ๊ด๋ ๋ค์์คํ์ด์ค ๋ช ๋ช ๊ท์น
- ์นด์นด์ค ๋ก๊ทธ์ธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์์กด์ฑ ์ถ๊ฐ
๋ชจ๋ ์ค์ ์ด Android ๋ชจ๋ ๋ชจ๋ฒ ์ฌ๋ก๋ฅผ ๋ฐ๋ฅด๊ณ ์์ต๋๋ค.
app/src/main/java/com/teamsolply/solply/SolplyApplication.kt (2)
4-5: ์นด์นด์ค SDK ์ด๊ธฐํ๋ฅผ ์ํ import๊ฐ ์ถ๊ฐ๋์์ต๋๋ค.์นด์นด์ค SDK ์ด๊ธฐํ์ ํ์ํ ํด๋์ค๋ค์ด ์ฌ๋ฐ๋ฅด๊ฒ import๋์์ต๋๋ค.
12-13: ์นด์นด์ค SDK ์ด๊ธฐํ๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌํ๋์์ต๋๋ค.Application์ onCreate()์์ ์นด์นด์ค SDK๋ฅผ ์ด๊ธฐํํ๋ ๊ฒ์ด ์ ์ ํ ์์น์ ๋๋ค. ๋น๋ ๊ตฌ์ฑ์์ ๋ค์ดํฐ๋ธ ํค๋ฅผ ๊ฐ์ ธ์ ์ฌ์ฉํ๋ ๋ฐฉ์๋ ๋ณด์์ ์์ ํ๊ณ ๊ตฌ์ฑ ๊ฐ๋ฅํ ์ ๊ทผ ๋ฐฉ๋ฒ์ ๋๋ค.
core/common/src/main/java/com/teamsolply/solply/common/buildconfig/BuildConfigFields.kt (1)
5-5: ์นด์นด์ค ๋ค์ดํฐ๋ธ ํค ํ๋๊ฐ ์ ์ ํ ์ถ๊ฐ๋์์ต๋๋ค.
kakaoNativeKeyํ๋๊ฐ ๊ธฐ์กด ๋น๋ ๊ตฌ์ฑ ํ๋๋ค๊ณผ ์ผ๊ด์ฑ์ ์ ์งํ๋ฉฐ ์ถ๊ฐ๋์์ต๋๋ค. String ํ์ ๊ณผ ๋ช ๋ช ๊ท์น์ด ์ฌ๋ฐ๋ฅด๋ฉฐ, ๋น๋ ๊ตฌ์ฑ ์์คํ ์ ํตํ ์นด์นด์ค SDK ์ฐ๋์ ์ง์ํฉ๋๋ค.feature/main/src/main/java/com/teamsolply/solply/main/MainScreen.kt (2)
17-17: OAuth ๋ค๋น๊ฒ์ด์ ๊ทธ๋ํ import๊ฐ ์ถ๊ฐ๋์์ต๋๋ค.OAuth ํผ์ณ ๋ชจ๋์ ๋ค๋น๊ฒ์ด์ ๊ทธ๋ํ๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํ import ๋ฌธ์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.
37-37: OAuth ๋ค๋น๊ฒ์ด์ ๊ทธ๋ํ๊ฐ ์ ์ ํ ํตํฉ๋์์ต๋๋ค.NavHost์ OAuth ๋ค๋น๊ฒ์ด์ ๊ทธ๋ํ๊ฐ ์ถ๊ฐ๋์ด ๊ธฐ์กด ํ ๋ค๋น๊ฒ์ด์ ๊ณผ ํจ๊ป ๊ตฌ์ฑ๋์์ต๋๋ค. PaddingValues๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ฌ๋๊ณ ์์ผ๋ฉฐ, Jetpack Compose ๋ค๋น๊ฒ์ด์ ๋ชจ๋ฒ ์ฌ๋ก๋ฅผ ๋ฐ๋ฅด๊ณ ์์ต๋๋ค.
feature/main/src/main/java/com/teamsolply/solply/main/MainNavigator.kt (2)
13-13: OAuth ๋ค๋น๊ฒ์ด์ import๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.์๋ก์ด OAuth ๊ธฐ๋ฅ ๋ชจ๋ ์ฐ๋์ ์ํ import๊ฐ ์ ์ ํ ์ถ๊ฐ๋์์ต๋๋ค.
22-22: ์ฑ ์์ ํ๋ฉด์ด OAuth๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค.์นด์นด์ค ๋ก๊ทธ์ธ ๊ตฌํ์ ๋ฐ๋ผ ์ฑ์ ์์ ๋์์ด OAuth ํ๋ฉด์ผ๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค. ์ด๋ PR ๋ชฉํ์ ์ผ์นํ๋ฉฐ ์ ์ ํ ๋ณ๊ฒฝ์ฌํญ์ ๋๋ค.
build-logic/convention/src/main/java/AndroidApplicationPlugin.kt (1)
2-2: gradleLocalProperties import๊ฐ ์ ์ ํ ์ถ๊ฐ๋์์ต๋๋ค.๋งค๋ํ์คํธ ํ๋ ์ด์คํ๋ ์ค์ ์ ์ํ import๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.
core/buildconfig/src/main/java/com/teamsolply/solply/buildconfig/impl/BuildConfigFieldsProviderImpl.kt (2)
3-4: BuildConfig import๊ฐ ์ ์ ํ ๊ฐ์ ๋์์ต๋๋ค.ํ์ํ ์์๋ค๋ง ์ ํ์ ์ผ๋ก importํ์ฌ ๊น๋ํ ์ฝ๋ ๊ตฌ์กฐ๋ฅผ ์ ์งํ์ต๋๋ค.
12-14: ์นด์นด์ค ๋ค์ดํฐ๋ธ ํค ํ๋๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.BuildConfigFields์ kakaoNativeKey ํ๋๊ฐ ์ ์ ํ ์ถ๊ฐ๋์ด ๊ธฐ์กด ํจํด๊ณผ ์ผ๊ด์ฑ์ ์ ์งํ๊ณ ์์ต๋๋ค.
app/src/main/AndroidManifest.xml (1)
20-33: ์นด์นด์ค SDK OAuth Activity๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌ์ฑ๋์์ต๋๋ค.AuthCodeHandlerActivity ์ค์ ์ด ์นด์นด์ค OAuth ํ๋ก์ฐ์ ํ์ํ ๋ชจ๋ ์์๋ฅผ ํฌํจํ๊ณ ์์ต๋๋ค:
- Intent filter๊ฐ VIEW ์ก์ ๊ณผ BROWSABLE ์นดํ ๊ณ ๋ฆฌ๋ก ์ ์ ํ ์ค์ ๋จ
- ๋งค๋ํ์คํธ ํ๋ ์ด์คํ๋๋ฅผ ์ฌ์ฉํ์ฌ ๋์ ์คํค๋ง ๊ตฌ์ฑ
- exported="true"๋ก ์ธ๋ถ ์ฑ์์ ์ ๊ทผ ๊ฐ๋ฅํ๋๋ก ์ค์
์ด๋ ์นด์นด์ค SDK ํตํฉ ๊ฐ์ด๋๋ผ์ธ์ ๋ถํฉํ๋ ์ฌ๋ฐ๋ฅธ ๊ตฌํ์ ๋๋ค.
feature/oauth/src/main/java/com/teamsolply/solply/oauth/presentation/OauthViewModel.kt (1)
7-15: LGTM! MVI ํจํด์ด ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌํ๋์์ต๋๋ค.ViewModel์ด BaseViewModel์ ์ ์ ํ ์์ํ๊ณ ์์ผ๋ฉฐ, Hilt๋ฅผ ํตํ ์์กด์ฑ ์ฃผ์ ๊ณผ ์ธํ ํธ ์ฒ๋ฆฌ ๋ก์ง์ด ๊น๋ํ๊ฒ ๊ตฌํ๋์ด ์์ต๋๋ค.
feature/oauth/src/main/java/com/teamsolply/solply/oauth/presentation/OauthContract.kt (1)
11-17: ์ธํ ํธ์ ์ฌ์ด๋์ดํํธ ์ ์๊ฐ ์ ์ ํฉ๋๋ค.
OauthIntent์OauthSideEffect๊ฐ sealed interface๋ก ์ ์ ํ ์ ์๋์ด ์์ผ๋ฉฐ, ์นด์นด์ค ๋ก๊ทธ์ธ ํ๋ก์ฐ์ ๋ง๋ ํ์ ์์ ํ ๊ตฌ์กฐ๋ฅผ ์ ๊ณตํฉ๋๋ค.feature/oauth/src/main/java/com/teamsolply/solply/oauth/navigation/OauthNavigation.kt (1)
12-30: LGTM! Compose Navigation ํจํด์ด ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌํ๋์์ต๋๋ค.์ต์ Compose Navigation ํจํด์ ์ฌ์ฉํ์ฌ type-safe navigation์ ๊ตฌํํ์ต๋๋ค.
@SerializableRoute ๊ฐ์ฒด์ ํ์ฅ ํจ์๋ค์ด ์ ์ ํ ์ ์๋์ด ์์ต๋๋ค.feature/oauth/src/main/java/com/teamsolply/solply/oauth/presentation/OauthScreen.kt (1)
58-75: UI ๊ตฌ์ฑ์ด ๊ฐ๋จํ๊ณ ๋ช ํํฉ๋๋ค.OAuth ํ๋ฉด์ UI๊ฐ ๊ฐ๋จํ๊ณ ํ ์คํธ ๋ชฉ์ ์ ์ ํฉํ๊ฒ ๊ตฌํ๋์ด ์์ต๋๋ค.
customClickableํ์ฅ ํจ์๋ฅผ ์ฌ์ฉํ์ฌ ์ ๊ทผ์ฑ๋ ๊ณ ๋ ค๋์์ต๋๋ค.
| buildConfigField( | ||
| "String", | ||
| "KAKAO_NATIVE_KEY", | ||
| gradleLocalProperties(rootDir, providers).getProperty("kakao.native.key") | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ ๏ธ Refactor suggestion
์นด์นด์ค ๋ค์ดํฐ๋ธ ํค ๋น๋ ์ค์ ์ null ์์ ์ฑ ๊ณ ๋ ค๊ฐ ํ์ํฉ๋๋ค.
๋ก์ปฌ properties์์ "kakao.native.key" ์์ฑ์ ์ฝ์ด์ค๋๋ฐ, ํด๋น ์์ฑ์ด ์กด์ฌํ์ง ์์ ๊ฒฝ์ฐ ๋น๋ ์ค๋ฅ๊ฐ ๋ฐ์ํ ์ ์์ต๋๋ค.
๋ค์๊ณผ ๊ฐ์ด ๊ธฐ๋ณธ๊ฐ์ ์ ๊ณตํ๋ ๊ฒ์ ๊ณ ๋ คํด๋ณด์ธ์:
buildConfigField(
"String",
"KAKAO_NATIVE_KEY",
- gradleLocalProperties(rootDir, providers).getProperty("kakao.native.key")
+ "\"${gradleLocalProperties(rootDir, providers).getProperty("kakao.native.key") ?: ""}\""
)๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| buildConfigField( | |
| "String", | |
| "KAKAO_NATIVE_KEY", | |
| gradleLocalProperties(rootDir, providers).getProperty("kakao.native.key") | |
| ) | |
| buildConfigField( | |
| "String", | |
| "KAKAO_NATIVE_KEY", | |
| - gradleLocalProperties(rootDir, providers).getProperty("kakao.native.key") | |
| + "\"${gradleLocalProperties(rootDir, providers).getProperty("kakao.native.key") ?: ""}\"" | |
| ) |
๐ค Prompt for AI Agents
In
build-logic/convention/src/main/java/com/teamsolply/solply/convention/BuildConfig.kt
around lines 17 to 21, the code reads the "kakao.native.key" property without
null safety, which can cause build errors if the property is missing. Modify the
code to provide a default value when the property is not found, ensuring null
safety and preventing build failures. Use a safe call or an Elvis operator to
supply a fallback string like an empty string or a placeholder.
build-logic/convention/src/main/java/AndroidApplicationPlugin.kt
Outdated
Show resolved
Hide resolved
| data class OauthState( | ||
| val g: String = "" | ||
| ) : UiState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ ๏ธ Refactor suggestion
ํ๋ ์ด์คํ๋ ํ๋กํผํฐ๋ฅผ ์ ๊ฑฐํ๊ฑฐ๋ ์๋ฏธ์๋ ์ด๋ฆ์ผ๋ก ๋ณ๊ฒฝํ์ธ์.
OauthState์ g ํ๋กํผํฐ๋ ์๋ฏธ๊ฐ ๋ถ๋ถ๋ช
ํ๋ฉฐ ์ค์ ๋ก ์ฌ์ฉ๋์ง ์๋ ๊ฒ ๊ฐ์ต๋๋ค. ๋ถํ์ํ ํ๋กํผํฐ๋ฅผ ์ ๊ฑฐํ๊ฑฐ๋ ์ค์ ํ์ํ ์ํ๋ฅผ ๋ํ๋ด๋ ์๋ฏธ์๋ ์ด๋ฆ์ผ๋ก ๋ณ๊ฒฝํด์ผ ํฉ๋๋ค.
data class OauthState(
- val g: String = ""
+ // ํ์ํ ๊ฒฝ์ฐ ์๋ฏธ์๋ ์ํ ํ๋กํผํฐ ์ถ๊ฐ
) : UiState๐ค Prompt for AI Agents
In
feature/oauth/src/main/java/com/teamsolply/solply/oauth/presentation/OauthContract.kt
around lines 7 to 9, the OauthState data class has a property named 'g' which is
unclear and likely unused. Remove this placeholder property if it is
unnecessary, or rename it to a meaningful name that accurately represents the
state it holds to improve code clarity and maintainability.
| Log.d( | ||
| "asdasdasd", | ||
| "accessToken: ${accessToken}\n refreshToken: $refreshToken" | ||
| ) | ||
| }, | ||
| onFailure = { error -> | ||
| Log.d("asdasdasd", error.toString()) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ ๏ธ Refactor suggestion
๋๋ฒ๊ทธ ๋ก๊ทธ ํ๊ทธ๋ฅผ ์๋ฏธ์๋ ์ด๋ฆ์ผ๋ก ๋ณ๊ฒฝํ์ธ์.
"asdasdasd" ๊ฐ์ ์์ ๋ก๊ทธ ํ๊ทธ๋ ํ๋ก๋์ ์ฝ๋์ ์ ํฉํ์ง ์์ต๋๋ค. ์๋ฏธ์๋ ํ๊ทธ๋ช ์ ์ฌ์ฉํ๊ณ , ๋ฏผ๊ฐํ ํ ํฐ ์ ๋ณด ๋ก๊น ์ ๊ณ ๋ คํด์ผ ํฉ๋๋ค.
Log.d(
- "asdasdasd",
+ "OAUTH_LOGIN",
"accessToken: ${accessToken}\n refreshToken: $refreshToken"
)๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Log.d( | |
| "asdasdasd", | |
| "accessToken: ${accessToken}\n refreshToken: $refreshToken" | |
| ) | |
| }, | |
| onFailure = { error -> | |
| Log.d("asdasdasd", error.toString()) | |
| } | |
| Log.d( | |
| "OAUTH_LOGIN", | |
| "accessToken: ${accessToken}\n refreshToken: $refreshToken" | |
| ) | |
| }, | |
| onFailure = { error -> | |
| Log.d("asdasdasd", error.toString()) | |
| } |
๐ค Prompt for AI Agents
In
feature/oauth/src/main/java/com/teamsolply/solply/oauth/presentation/OauthScreen.kt
around lines 40 to 47, replace the placeholder log tag "asdasdasd" with a
meaningful and descriptive tag relevant to the OAuth screen or authentication
process. Additionally, remove or mask sensitive token information like
accessToken and refreshToken from the logs to avoid exposing confidential data.
| fun startKakaoLogin( | ||
| context: Context, | ||
| onSuccess: (accessToken: String, refreshToken: String?) -> Unit = { _, _ -> }, | ||
| onFailure: (Throwable) -> Unit = {} | ||
| ) { | ||
| val activity = context as? Activity ?: return | ||
|
|
||
| if (UserApiClient.instance.isKakaoTalkLoginAvailable(context)) { | ||
| UserApiClient.instance.loginWithKakaoTalk(activity) { token, error -> | ||
| if (error != null) { | ||
| if (error is ClientError && error.reason == ClientErrorCause.Cancelled) { | ||
| Toast.makeText(context, "๋ก๊ทธ์ธ ์ทจ์", Toast.LENGTH_SHORT).show() | ||
| return@loginWithKakaoTalk | ||
| } | ||
| UserApiClient.instance.loginWithKakaoAccount(context) { accountToken, accountError -> | ||
| if (accountError != null) { | ||
| onFailure(accountError) | ||
| Toast.makeText( | ||
| context, | ||
| "๋ก๊ทธ์ธ ์คํจ: ${accountError.message}", | ||
| Toast.LENGTH_SHORT | ||
| ).show() | ||
| return@loginWithKakaoAccount | ||
| } | ||
| if (accountToken != null) { | ||
| onSuccess(accountToken.accessToken, accountToken.refreshToken) | ||
| } | ||
| } | ||
| } else if (token != null) { | ||
| onSuccess(token.accessToken, token.refreshToken) | ||
| } | ||
| } | ||
| } else { | ||
| UserApiClient.instance.loginWithKakaoAccount(context) { token, error -> | ||
| Log.d("KAKAO_LOGIN", "loginWithKakaoAccount called. token=$token, error=$error") | ||
| if (error != null) { | ||
| onFailure(error) | ||
| Toast.makeText(context, "๋ก๊ทธ์ธ ์คํจ: ${error.message}", Toast.LENGTH_SHORT).show() | ||
| return@loginWithKakaoAccount | ||
| } | ||
| if (token != null) { | ||
| onSuccess(token.accessToken, token.refreshToken) | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ ๏ธ Refactor suggestion
์นด์นด์ค ๋ก๊ทธ์ธ ๊ตฌํ์ด ์ ๋์ด ์์ง๋ง ๊ฐ์ ์ฌํญ์ด ์์ต๋๋ค.
์นด์นด์คํก ์ฑ ๋ก๊ทธ์ธ๊ณผ ๊ณ์ ๋ก๊ทธ์ธ์ ๋ถ๊ธฐ ์ฒ๋ฆฌ๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌํ๋์์ต๋๋ค. ํ์ง๋ง ๋ค์ ๊ฐ์ ์ฌํญ์ ๊ณ ๋ คํด๋ณด์ธ์:
- ๋ฌธ์์ด ํ๋์ฝ๋ฉ: ํ ์คํธ ๋ฉ์์ง๋ค์ด ํ๋์ฝ๋ฉ๋์ด ์์ต๋๋ค
- ๋ก๊ทธ ์ผ๊ด์ฑ: ์ผ๋ถ ๋ก๊ทธ๋ง ๊ตฌ์ฒด์ ์ธ ํ๊ทธ๋ฅผ ์ฌ์ฉํฉ๋๋ค
- ํ ํฐ ๋ณด์: ์ก์ธ์ค ํ ํฐ์ ๋ก๊ทธ์ ์ถ๋ ฅํ๋ ๊ฒ์ ๋ณด์์ ์ํํ ์ ์์ต๋๋ค
if (error is ClientError && error.reason == ClientErrorCause.Cancelled) {
- Toast.makeText(context, "๋ก๊ทธ์ธ ์ทจ์", Toast.LENGTH_SHORT).show()
+ Toast.makeText(context, context.getString(R.string.login_cancelled), Toast.LENGTH_SHORT).show()
return@loginWithKakaoTalk
}- Log.d("KAKAO_LOGIN", "loginWithKakaoAccount called. token=$token, error=$error")
+ Log.d("OAUTH_LOGIN", "loginWithKakaoAccount called")๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fun startKakaoLogin( | |
| context: Context, | |
| onSuccess: (accessToken: String, refreshToken: String?) -> Unit = { _, _ -> }, | |
| onFailure: (Throwable) -> Unit = {} | |
| ) { | |
| val activity = context as? Activity ?: return | |
| if (UserApiClient.instance.isKakaoTalkLoginAvailable(context)) { | |
| UserApiClient.instance.loginWithKakaoTalk(activity) { token, error -> | |
| if (error != null) { | |
| if (error is ClientError && error.reason == ClientErrorCause.Cancelled) { | |
| Toast.makeText(context, "๋ก๊ทธ์ธ ์ทจ์", Toast.LENGTH_SHORT).show() | |
| return@loginWithKakaoTalk | |
| } | |
| UserApiClient.instance.loginWithKakaoAccount(context) { accountToken, accountError -> | |
| if (accountError != null) { | |
| onFailure(accountError) | |
| Toast.makeText( | |
| context, | |
| "๋ก๊ทธ์ธ ์คํจ: ${accountError.message}", | |
| Toast.LENGTH_SHORT | |
| ).show() | |
| return@loginWithKakaoAccount | |
| } | |
| if (accountToken != null) { | |
| onSuccess(accountToken.accessToken, accountToken.refreshToken) | |
| } | |
| } | |
| } else if (token != null) { | |
| onSuccess(token.accessToken, token.refreshToken) | |
| } | |
| } | |
| } else { | |
| UserApiClient.instance.loginWithKakaoAccount(context) { token, error -> | |
| Log.d("KAKAO_LOGIN", "loginWithKakaoAccount called. token=$token, error=$error") | |
| if (error != null) { | |
| onFailure(error) | |
| Toast.makeText(context, "๋ก๊ทธ์ธ ์คํจ: ${error.message}", Toast.LENGTH_SHORT).show() | |
| return@loginWithKakaoAccount | |
| } | |
| if (token != null) { | |
| onSuccess(token.accessToken, token.refreshToken) | |
| } | |
| } | |
| } | |
| } | |
| fun startKakaoLogin( | |
| context: Context, | |
| onSuccess: (accessToken: String, refreshToken: String?) -> Unit = { _, _ -> }, | |
| onFailure: (Throwable) -> Unit = {} | |
| ) { | |
| val activity = context as? Activity ?: return | |
| if (UserApiClient.instance.isKakaoTalkLoginAvailable(context)) { | |
| UserApiClient.instance.loginWithKakaoTalk(activity) { token, error -> | |
| if (error != null) { | |
| if (error is ClientError && error.reason == ClientErrorCause.Cancelled) { | |
| Toast.makeText( | |
| context, | |
| context.getString(R.string.login_cancelled), | |
| Toast.LENGTH_SHORT | |
| ).show() | |
| return@loginWithKakaoTalk | |
| } | |
| UserApiClient.instance.loginWithKakaoAccount(context) { accountToken, accountError -> | |
| if (accountError != null) { | |
| onFailure(accountError) | |
| Toast.makeText( | |
| context, | |
| "๋ก๊ทธ์ธ ์คํจ: ${accountError.message}", | |
| Toast.LENGTH_SHORT | |
| ).show() | |
| return@loginWithKakaoAccount | |
| } | |
| if (accountToken != null) { | |
| onSuccess(accountToken.accessToken, accountToken.refreshToken) | |
| } | |
| } | |
| } else if (token != null) { | |
| onSuccess(token.accessToken, token.refreshToken) | |
| } | |
| } | |
| } else { | |
| UserApiClient.instance.loginWithKakaoAccount(context) { token, error -> | |
| Log.d("OAUTH_LOGIN", "loginWithKakaoAccount called") | |
| if (error != null) { | |
| onFailure(error) | |
| Toast.makeText( | |
| context, | |
| "๋ก๊ทธ์ธ ์คํจ: ${error.message}", | |
| Toast.LENGTH_SHORT | |
| ).show() | |
| return@loginWithKakaoAccount | |
| } | |
| if (token != null) { | |
| onSuccess(token.accessToken, token.refreshToken) | |
| } | |
| } | |
| } | |
| } |
๐ค Prompt for AI Agents
In
feature/oauth/src/main/java/com/teamsolply/solply/oauth/presentation/OauthScreen.kt
between lines 77 and 122, the toast messages are hardcoded in Korean and should
be moved to string resources for localization support. Also, ensure all log
statements use a consistent and specific tag instead of generic ones. Finally,
remove or avoid logging access tokens or any sensitive token information to
prevent security risks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
๐งน Nitpick comments (1)
.github/workflows/android-pull-request-ci.yml (1)
25-25: ๋ค์ด๋ฐ ์ผ๊ด์ฑ: step ์ด๋ฆ๊ณผ ์์ฑ๋ช ํต์ผ
ํ์ฌ step ์ด๋ฆ์์kakaoNativeKey๋ผ๊ณ ํ๊ธฐ๋์์ผ๋, ์ค์ ๋ก ์์ฑ๋๋ ์์ฑ์kakao.native.key์ ๋๋ค. step ์ด๋ฆ์ ์์ฑ๋ช ๊ณผ ์ผ์น์ํค๊ฑฐ๋(์:kakao.native.key), ์์ฑ๋ช ์ camelCase๋ก ๋ณ๊ฒฝํด ๋ค์ด๋ฐ์ ํต์ผํ๋ ๊ฒ์ด ์ข์ต๋๋ค.
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
๐ Files selected for processing (2)
.github/workflows/android-pull-request-ci.yml(1 hunks)build-logic/convention/src/main/java/AndroidApplicationPlugin.kt(2 hunks)
๐ง Files skipped from review as they are similar to previous changes (1)
- build-logic/convention/src/main/java/AndroidApplicationPlugin.kt
โฐ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
๐ PR ์์ฝ
๐ฑ ์์ ํ ๋ด์ฉ
๐ฑ PR ํฌ์ธํธ
๐ธ ์คํฌ๋ฆฐ์ท
Screen_recording_20250624_030922.mp4
|ํ์ผ์ฒจ๋ถ๋ฐ๋|
๐ฎ ๊ด๋ จ ์ด์
Summary by CodeRabbit
Summary by CodeRabbit
์ ๊ท ๊ธฐ๋ฅ
๊ธฐํ