-
Notifications
You must be signed in to change notification settings - Fork 237
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
Authenticate users with Sign in with Google GetCredentialException:During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential. #94
Comments
I'm facing this issue, too. Do you find any good solution. Thank you |
Trigger a Sign in with Google button flow Try using the following method: fun loginAgain(activity : FragmentActivity?){
} |
I've already used that |
Hey would you mind creating a bug for those users with all details required in that template? Please add version details, bug report, video recording, device details, api version used etc if you are able to reproduce. Sharing the bug link here : https://issuetracker.google.com/issues/new?component=1301097&template=1773864 This will help us test and verify the issue on these devices. |
I am facing the same issue any solution for this ? androidx.credentials.exceptions.NoCredentialException: During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential. |
Hi As mentioned above, please create a bug and provide all the details to deep dive : Hey would you mind creating a bug for those users with all details required in that template? Please add version details, bug report, video recording, device details, api version used etc if you are able to reproduce. Sharing the bug link here : https://issuetracker.google.com/issues/new?component=1301097&template=1773864 |
I had the same problem as the others. @zhangwenxiang26's solution was the only thing that worked. The API does not appear to account for the case where there is no device account available. Docs for NoCredentialsException suggest
but my current project only uses OAuth and Passkey for authentication. Samples aren't particularly clear on how to handle this scenario. |
I am having the same issue. It was working fine till yesterday. But now I'm getting this error |
The solution is to manually call the google account creation when we have this exceptions if (error is NoCredentialException) {
launchAddGoogleAccount()
} private fun launchAddGoogleAccount() {
val intent = Intent(Settings.ACTION_ADD_ACCOUNT)
intent.putExtra(Settings.EXTRA_ACCOUNT_TYPES, arrayOf("com.google"))
addAccountLauncher.launch(intent);
}
private val addAccountLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result: ActivityResult ->
if (result.resultCode == RESULT_OK) {
authChoicesViewModel.onGoogleButtonClick()
} else {
viewModel.hideProgress()
}
} Unfortunately, RESULT_OK is never triggered. Even if we successfully add a Google account, the app returns with RESULT_CANCELED. As a result, the user will need to click on 'Login with Google' in our app again after adding a Google account. |
Is this a problem that hasn't been solved yet? |
I am getting the following error regarding the same
Any idea why it does not work? For normal GoogleSignIn it is working. |
dependent Sdk Version:
implementation "androidx.credentials:credentials:1.3.0-rc01"
implementation "androidx.credentials:credentials-play-services-auth:1.3.0-rc01"
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
Test model:
OPPO PDKM00 Android12
Problem occurred:
GetCredentialException,
During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential.
android.credentials.GetCredentialException.TYPE_NO_CREDENTIAL
Operation steps when a problem occurs:
Step 1:
Open phone settings->User and Account->Password and account Delete Google account
Step 2:
Refer to the official documentation to log in to Google
https://developer.android.com/identity/sign-in/credential-manager-siwg#siwg-button
The code is as follows:
private var mCm: CredentialManager? = null
fun initLogin(activity : FragmentActivity?){
mCm = CredentialManager.create(this)
}
fun login(activity : FragmentActivity?){
activity?.apply {
val googleIdOption: GetGoogleIdOption = GetGoogleIdOption.Builder()
.setFilterByAuthorizedAccounts(true)
.setServerClientId(serviceClientId)
.setAutoSelectEnabled(true)
.build()
}
fun loginAgain(activity : FragmentActivity?){
Expected results:
If none are found, prompt the user to sign up with their Google Account using setFilterByAuthorizedAccounts(false);
pop-up interface for entering Google account:
Actual results:
Following the instructions in the document,
If no saved credentials are found (no Google Accounts returned by getGoogleIdOption), prompt your user to sign up. First, check if setFilterByAuthorizedAccounts(true) to see if any previously used accounts exist. If none are found, prompt the user to sign up with their Google Account using setFilterByAuthorizedAccounts(false);
an error still occurs,No pop-up interface for entering Google account:
exception occurred GetCredentialException,
During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential;
android.credentials.GetCredentialException.TYPE_NO_CREDENTIAL;
The text was updated successfully, but these errors were encountered: