更新Google登录
This commit is contained in:
@@ -22,10 +22,10 @@ fun handleGoogleSignIn(result: GetCredentialResponse, onLoginWithGoogle: (String
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun GoogleLogin(context: Context, onLoginWithGoogle: (String) -> Unit) {
|
||||
suspend fun GoogleLogin(context: Context,clientId:String, onLoginWithGoogle: (String) -> Unit) {
|
||||
val credentialManager = CredentialManager.create(context)
|
||||
val googleIdOption: GetGoogleIdOption = GetGoogleIdOption.Builder()
|
||||
.setServerClientId("987156664714-3bpf58ldhhr0m474ep48l668ngdn7860.apps.googleusercontent.com")
|
||||
.setServerClientId(clientId)
|
||||
.setFilterByAuthorizedAccounts(false)
|
||||
.build()
|
||||
val request = GetCredentialRequest.Builder().addCredentialOption(googleIdOption)
|
||||
|
||||
Reference in New Issue
Block a user