Skip to content

Commit

Permalink
feat: Google Login 성공 시 사용자의 id, email, profileUrl을 넘겨주는 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
comst19 committed Jan 17, 2024
1 parent 5728674 commit 8fb3c9a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ class SocialLoginUtil(private val context: Context, private val callback: LoginC
try {
val account = completedTask.getResult(ApiException::class.java)
//Log.d("구글", "로그인 성공: ${account.idToken}")
Log.d("구글 id", "로그인 성공: ${account.id}")
Log.d("구글 email", "로그인 성공: ${account.email}")
Log.d("구글 프로필", "로그인 성공: ${account.photoUrl}")
//callback.onLoginSuccess(AuthViewModel.Social.GOOGLE)
val authId = account.id.toString()
val email = account.email ?: ""
val profileUrl = account.photoUrl.toString() ?: ""

callback.onLoginSuccess(authId, email, profileUrl,AuthViewModel.Social.GOOGLE)
} catch (e: ApiException) {
//Log.w("구글", "signInResult:failed code=" + e.statusCode)
//callback.onLoginFailure(e)
callback.onLoginFailure(e)
}
}
}

0 comments on commit 8fb3c9a

Please sign in to comment.