So far I have set up this:
is CustomCredential -> {
if (credential.type == GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_CREDENTIAL) {
and it's actually all I need.
But what are the other two possibilities:
is PublicKeyCredential -> {
val responseJson = credential.authenticationResponseJson
}
is PasswordCredential -> {
// Send ID and password to your server to validate and authenticate.
val username = credential.id
val password = credential.password
}
?
When I test the login, I don't see anything that I could do to enable/use those.
This is the request:
val googleIdOption: GetGoogleIdOption = GetGoogleIdOption.Builder()
.setFilterByAuthorizedAccounts(false)
.setServerClientId("keyyyy")
.setNonce(hashedNonce)
.build()
val request: GetCredentialRequest = GetCredentialRequest.Builder()
.addCredentialOption(googleIdOption)
.build()
Do I need to add something to the request to enable those?
The google docs are unclear since they are as always like a puzzle in which all informations are scattered on 1000 different pages.