-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FEAT/#72] 소셜 로그인 / 서버통신 구현 #87
Conversation
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.
유빈이는 정말 최고야,,, 짱이야,,, 이걸 해내다니,,, 세상에 이런 갓기가,,, 진짜 개큰박수👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻
import javax.inject.Inject | ||
|
||
class TerningDataStoreImpl @Inject constructor( | ||
private val dataStore: SharedPreferences, |
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.
SharedPreferences 사용하는게 자동 로그인을 위한거 맞나요?!?!???
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.
네! 맞습니당
if (response.accessToken == null) _signInSideEffects.emit(SignInSideEffect.NavigateSignUp) | ||
else _signInSideEffects.emit(SignInSideEffect.NavigateToHome) |
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.
오호!! navigate도 sideEffect로 처리하는군요!!!! 새로운거 배워갑니다❤️
<string name="server_success">서버통신에 성공했어요</string> | ||
<string name="server_failure">서버통신에 실패했어요</string> |
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.
센스쟁이❤️
accessToken, | ||
SignInRequestModel(platform) | ||
).onSuccess { response -> | ||
tokenRepository.setTokens(response.accessToken, response.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.
accessToken이 null인 상황도 있는 것 같은데 tokenRepository에 null값이 들어가도 괜찮은가요??
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.
날카롭다,,, 그 경우를 고려 못했네요!!!! 바로 로직 수정했습니당~~!! 최고!!
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.
유비니가 최고야
@JWT | ||
fun provideJWTRetrofit( | ||
client: OkHttpClient, | ||
factory: Converter.Factory |
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.
OPEN -> JWT로 바꾼 이유가 있나용!
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.
OPEN은 오픈API를 사용했기 때문에 네이밍을 그렇게 지었습니다!
이제부터는 실제 사용할 base.url을 넣어줬기 때문에 네이밍을 수정해야 할 것 같아서 바꿔줬어요!!
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.
터닝 안드 교과서 그 자체네요~!!
코드 잘 숙지해서 제 코드에 잘 반영해야겠습니닷
private fun signInSuccess( | ||
accessToken: String, | ||
platform: String = KAKAO | ||
) { | ||
viewModelScope.launch { |
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.
이렇게 여러 번 viewModelScope
를 사용하신 이유가 있나요??
정지 함수를 사용할 수도 있을 것 같은데 뭔 차이가 있는지 궁금해요,,,
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.
적용할 수 있는 건 suspend fun 적용했습니당~!!
⛳️ Work Description
📢 To Reviewers