-
public final class CredentialManagerHandler extends AuthViewModelBase<IdpResponse>
-
-
Field Summary
Fields Modifier and Type Field Description private final Tapplication
-
Constructor Summary
Constructors Constructor Description CredentialManagerHandler(Application application)
-
Method Summary
Modifier and Type Method Description TgetApplication()final UnitsetResponse(IdpResponse newResponse)final UnitsaveCredentials(Context context, FirebaseUser firebaseUser, String email, String password)Saves credentials via Credential Manager if enabled in getArguments().enableCredentials. -
Methods inherited from class androidx.lifecycle.AndroidViewModel
addCloseable, clear, getTag, setTagIfAbsent -
Methods inherited from class com.firebase.ui.auth.viewmodel.OperableViewModel
getArguments, init, onCleared, setArguments -
Methods inherited from class com.firebase.ui.auth.viewmodel.credentialmanager.CredentialManagerHandler
getAuth, getCurrentUser, getSignInClient, initializeForTesting, onCreate -
Methods inherited from class com.firebase.ui.auth.viewmodel.AuthViewModelBase
getOperation, setResult -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CredentialManagerHandler
CredentialManagerHandler(Application application)
-
-
Method Detail
-
getApplication
T getApplication()
-
setResponse
final Unit setResponse(IdpResponse newResponse)
-
saveCredentials
final Unit saveCredentials(Context context, FirebaseUser firebaseUser, String email, String password)
Saves credentials via Credential Manager if enabled in getArguments().enableCredentials. Uses a password-based credential for demonstration; adapt to passkeys or other flows as needed.
- Parameters:
context- the Context to use.firebaseUser- the current FirebaseUser.email- the email to use as the identifier.password- the password used for sign-in.
-
-
-
-