-
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) public final class CredentialUtils
Utility class for extracting credential data from a FirebaseUser for the new CredentialManager.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCredentialUtils.CredentialDataA simple data class representing the information required by the new CredentialManager.
-
Method Summary
Modifier and Type Method Description static CredentialUtils.CredentialDatabuildCredentialData(@NonNull() FirebaseUser user, @Nullable() String password)Extracts the necessary data from the specified FirebaseUser along with the user's password. static CredentialUtils.CredentialDatabuildCredentialDataOrThrow(@NonNull() FirebaseUser user, @Nullable() String password)Same as buildCredentialData but throws an exception if data cannot be built. -
-
Method Detail
-
buildCredentialData
@Nullable() static CredentialUtils.CredentialData buildCredentialData(@NonNull() FirebaseUser user, @Nullable() String password)
Extracts the necessary data from the specified FirebaseUser along with the user's password.
If both the email and phone number are missing or the password is empty, this method returns
{@code null}.- Parameters:
user- the FirebaseUser from which to extract data.password- the password the user signed in with.
-
buildCredentialDataOrThrow
@NonNull() static CredentialUtils.CredentialData buildCredentialDataOrThrow(@NonNull() FirebaseUser user, @Nullable() String password)
Same as buildCredentialData but throws an exception if data cannot be built.
- Parameters:
user- the FirebaseUser.password- the password the user signed in with.
-
-
-
-