-
Notifications
You must be signed in to change notification settings - Fork 1
[Feature/#74] login api #76
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
Changes from all commits
03d6e77
73bc90c
3d6b40b
1861723
14bfead
b4d3db1
20f1fd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -32,13 +32,12 @@ class AccessTokenInterceptor @Inject constructor( | |||||||||||||||||||||||||
| originalRequest | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| if (Log.isLoggable(TAG, Log.DEBUG)) { | ||||||||||||||||||||||||||
| Log.d(TAG, "Request URL: ${newRequest.url}") | ||||||||||||||||||||||||||
| Log.d( | ||||||||||||||||||||||||||
| TAG, | ||||||||||||||||||||||||||
| "Authorization header: ${if (newRequest.header("Authorization") != null) "Bearer [REDACTED]" else "null"}" | ||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| Log.d(TAG, "Request URL: ${newRequest.url}") | ||||||||||||||||||||||||||
| Log.d( | ||||||||||||||||||||||||||
| TAG, | ||||||||||||||||||||||||||
| "Authorization header: ${if (newRequest.header("Authorization") != null) "Bearer [REDACTED]" else "null"}" | ||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||
|
Comment on lines
+35
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ํ๋ก๋์ ํ๊ฒฝ์์ ๋ฏผ๊ฐํ ์ ๋ณด ๋ก๊น ์ ๋ณด์ ์ํ์ด ์์ต๋๋ค. ์กฐ๊ฑด๋ถ ๋๋ฒ๊ทธ ๋ก๊น ์ ์ ๊ฑฐํ๊ณ ๋ชจ๋ ์์ฒญ์ ๋ํด URL๊ณผ ์ธ์ฆ ํค๋ ์ ๋ณด๋ฅผ ๋ฌด์กฐ๊ฑด ๋ก๊น ํ๋ ๊ฒ์ ๋ณด์์ ์ํํฉ๋๋ค. ํ๋ก๋์ ๋น๋์์๋ ๋ฏผ๊ฐํ ์ ๋ณด๊ฐ ๋ก๊ทธ์ ๋ ธ์ถ๋ ์ ์์ต๋๋ค. ๋ค์๊ณผ ๊ฐ์ด ์์ ํ์ฌ ๋๋ฒ๊ทธ ๋น๋์์๋ง ๋ก๊น ํ๋๋ก ๊ฐ์ ํ์ธ์: - Log.d(TAG, "Request URL: ${newRequest.url}")
- Log.d(
- TAG,
- "Authorization header: ${if (newRequest.header("Authorization") != null) "Bearer [REDACTED]" else "null"}"
- )
+ if (BuildConfig.DEBUG) {
+ Log.d(TAG, "Request URL: ${newRequest.url}")
+ Log.d(
+ TAG,
+ "Authorization header: ${if (newRequest.header("Authorization") != null) "Bearer [REDACTED]" else "null"}"
+ )
+ }๐ Committable suggestion
Suggested change
๐ค Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| return chain.proceed(newRequest) | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package com.teamsolply.solply.oauth.dto.request | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class SocialLoginRequestDto( | ||
| @SerialName("oauthAccessToken") | ||
| val oauthAccessToken: String | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package com.teamsolply.solply.oauth.dto.response | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class SocialLoginResponseDto( | ||
| @SerialName("accessToken") | ||
| val accessToken: String, | ||
| @SerialName("refreshToken") | ||
| val refreshToken: String, | ||
| @SerialName("isNewUser") | ||
| val isNewUser: Boolean | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package com.teamsolply.solply.oauth.source | ||
|
|
||
| import com.teamsolply.solply.oauth.dto.response.SocialLoginResponseDto | ||
|
|
||
| interface OauthRemoteDataSource { | ||
| suspend fun socialLogin(provider: String, oauthAccessToken: String): SocialLoginResponseDto | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package com.teamsolply.solply.onboarding.dto.response | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class NicknameDuplicateResponseDto( | ||
| @SerialName("isDuplicated") | ||
| val isDuplicated: Boolean | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| package com.teamsolply.solply.onboarding.dto.response | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class PatchUserInfoResponseDto( | ||
| @SerialName("favoriteTownId") | ||
| val favoriteTownId: Long, | ||
| @SerialName("favoriteTownName") | ||
| val favoriteTownName: String, | ||
| @SerialName("persona") | ||
| val persona: String, | ||
| @SerialName("nickname") | ||
| val nickname: String | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,35 @@ | ||
| package com.teamsolply.solply.onboarding.repository | ||
|
|
||
| import com.teamsolply.solply.onboarding.model.SignUpEntity | ||
| import com.teamsolply.solply.onboarding.dto.request.PatchUserInfoRequestDto | ||
| import com.teamsolply.solply.onboarding.model.UserInfoEntity | ||
| import com.teamsolply.solply.onboarding.source.OnBoardingRemoteDataSource | ||
| import javax.inject.Inject | ||
|
|
||
| class OnBoardingRepositoryImpl @Inject constructor( | ||
| private val onBoardingRemoteDataSource: OnBoardingRemoteDataSource | ||
| ) : OnBoardingRepository { | ||
| override suspend fun signUp(signUpInfo: SignUpEntity) = runCatching { | ||
| onBoardingRemoteDataSource.signUp( | ||
| nickname = signUpInfo.nickname, | ||
| id = signUpInfo.userId | ||
| override suspend fun checkNicknameDuplicate(nickname: String): Result<Boolean> = runCatching { | ||
| onBoardingRemoteDataSource.checkNicknameDuplicate(nickname = nickname).isDuplicated | ||
| } | ||
|
|
||
| override suspend fun patchUserInfo( | ||
| favoriteTown: Long, | ||
| persona: String, | ||
| nickname: String | ||
| ): Result<UserInfoEntity> = runCatching { | ||
| onBoardingRemoteDataSource.patchUserInfo( | ||
| PatchUserInfoRequestDto( | ||
| favoriteTown = favoriteTown, | ||
| persona = persona, | ||
| nickname = nickname | ||
| ) | ||
| ) | ||
| }.mapCatching { | ||
| UserInfoEntity( | ||
| favoriteTownId = it.favoriteTownId, | ||
| favoriteTownName = it.favoriteTownName, | ||
| persona = it.persona, | ||
| nickname = it.nickname | ||
| ) | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| package com.teamsolply.solply.onboarding.source | ||
|
|
||
| import com.teamsolply.solply.onboarding.dto.request.PatchUserInfoRequestDto | ||
| import com.teamsolply.solply.onboarding.dto.response.NicknameDuplicateResponseDto | ||
| import com.teamsolply.solply.onboarding.dto.response.PatchUserInfoResponseDto | ||
|
|
||
| interface OnBoardingRemoteDataSource { | ||
| suspend fun signUp(nickname: String, id: Int) | ||
| suspend fun checkNicknameDuplicate(nickname: String): NicknameDuplicateResponseDto | ||
| suspend fun patchUserInfo(patchUserInfoRequestDto: PatchUserInfoRequestDto): PatchUserInfoResponseDto | ||
| } |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package com.teamsolply.solply.onboarding.model | ||
|
|
||
| data class UserInfoEntity( | ||
| val favoriteTownId: Long?, | ||
| val favoriteTownName: String, | ||
| val persona: String, | ||
| val nickname: String | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,12 @@ | ||
| package com.teamsolply.solply.onboarding.repository | ||
|
|
||
| import com.teamsolply.solply.onboarding.model.SignUpEntity | ||
| import com.teamsolply.solply.onboarding.model.UserInfoEntity | ||
|
|
||
| interface OnBoardingRepository { | ||
| suspend fun signUp(signUpInfo: SignUpEntity): Result<Unit> | ||
| suspend fun checkNicknameDuplicate(nickname: String): Result<Boolean> | ||
| suspend fun patchUserInfo( | ||
| favoriteTown: Long, | ||
| persona: String, | ||
| nickname: String | ||
| ): Result<UserInfoEntity> | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,6 @@ import com.teamsolply.solply.mypage.collection.course.navigateCourseCollection | |
| import com.teamsolply.solply.mypage.collection.place.navigatePlaceCollection | ||
| import com.teamsolply.solply.mypage.navigation.navigateMypage | ||
| import com.teamsolply.solply.oauth.navigation.navigateOauth | ||
| import com.teamsolply.solply.onboarding.navigation.OnBoarding | ||
| import com.teamsolply.solply.onboarding.navigation.navigateOnBoarding | ||
| import com.teamsolply.solply.place.navigation.navigatePlace | ||
|
|
||
|
|
@@ -27,7 +26,7 @@ internal class MainNavigator( | |
| @Composable get() = navController | ||
| .currentBackStackEntryAsState().value?.destination | ||
|
|
||
| val startDestination = OnBoarding | ||
| val startDestination = Splash | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐ก Verification agent ๐งฉ Analysis chain์์ ํ๋ฉด ๋ณ๊ฒฝ์ด ์ฑ ํ๋ก์ฐ์ ๋ฏธ์น๋ ์ํฅ์ ๊ฒ์ฆํ์ธ์. ์์ ํ๋ฉด์ ์คํ๋์ ํ๋ฉด์์ ์จ๋ณด๋ฉ/OAuth๋ก์ ๋ค๋น๊ฒ์ด์ ๋ก์ง์ ํ์ธํ์ธ์: ๐ Script executed: #!/bin/bash
# ์คํ๋์ ํ๋ฉด์์ ๋ค๋ฅธ ํ๋ฉด์ผ๋ก์ ๋ค๋น๊ฒ์ด์
๋ก์ง ๊ฒ์
fd -t f -e kt | xargs grep -l "Splash" | xargs grep -A 10 -B 5 "navigate"Length of output: 17757 Splash ํ๋ฉด์์ ์จ๋ณด๋ฉ ๋ก์ง ๋๋ฝ ํ์ธ ๋ฐ ๋ณด์ ํ์ Splash๋ฅผ ์์ ํ๋ฉด์ผ๋ก ๋ณ๊ฒฝํ๋ฉด์ ์ค์ ๋ก OnBoarding์ผ๋ก์ ๋ค๋น๊ฒ์ด์
์ด ๋น ์ ธ ์๋ ๊ฒ์ผ๋ก ๋ณด์
๋๋ค. MainNavigator์๋ ์ฌ์ ํ ์กฐ์น๊ฐ ํ์ํ ์์น:
์ ์
์ ์ฌํญ์ ๋ฐ์ํด ์ฑ ํ๋ก์ฐ๊ฐ ์๋ํ ๋๋ก ๋์ํ๋์ง ๊ฒ์ฆ ํ ์์ ๋ฐ๋๋๋ค. ๐ค Prompt for AI Agents |
||
|
|
||
| val currentTab: MainNavTab? | ||
| @Composable get() = MainNavTab.find { tab -> | ||
|
|
||
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.
๋ฆด๋ฆฌ์ฆ ๋น๋์์ ๋๋ฒ๊ทธ ํค์คํ ์ด ์ฌ์ฉ ๋ฐ ๋๋ ํ ๋นํ์ฑํ ๋ฌธ์
๋ฆด๋ฆฌ์ฆ ๋น๋์์ ๋๋ฒ๊ทธ ํค์คํ ์ด๋ฅผ ์ฌ์ฉํ๊ณ ์์ผ๋ฉฐ, ์ฝ๋ ๋๋ ํ๊ฐ ๋นํ์ฑํ๋์ด ์์ต๋๋ค. ์ด๋ ๋ณด์์ ์ํํ ์ ์์ต๋๋ค.
๋ค์ ์์ ์ฌํญ์ ์ ์ฉํ์ธ์:
๐ค Prompt for AI Agents