-
Notifications
You must be signed in to change notification settings - Fork 2
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] 카카오 소셜로그인 기능추가 #12
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.example.numberoneproject.domain.usecase | ||
|
||
import com.example.numberoneproject.data.model.LoginTokenResponse | ||
import com.example.numberoneproject.data.model.TokenRequestBody | ||
import com.example.numberoneproject.data.network.ApiResult | ||
import com.example.numberoneproject.domain.repository.LoginRepository | ||
import javax.inject.Inject | ||
class KakaoLoginUsecase @Inject constructor( | ||
private val loginRepository: LoginRepository | ||
) { | ||
suspend operator fun invoke( | ||
loginBody: TokenRequestBody | ||
) : ApiResult<LoginTokenResponse>{ | ||
return loginRepository.userKakaoLogin(loginBody) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
package com.example.numberoneproject.presentation.di | ||
|
||
import android.app.Application | ||
import com.example.numberoneproject.BuildConfig | ||
import com.kakao.sdk.common.KakaoSdk | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class MyApplication: Application() { | ||
|
||
val KAKAO = BuildConfig.KAKAO_NATIVE_APP_KEY | ||
override fun onCreate() { | ||
super.onCreate() | ||
KakaoSdk.init(this,KAKAO) | ||
} | ||
} |
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.
#11 자동로그인 로직 옮겨야 할 것 같았던 부분인데 이렇게 하면 좋을 것 같아요