Class CredentialUtils


  • public class CredentialUtils
    extends Object
    Utility class for working with Credential objects.
    • Method Detail

      • buildCredential

        @Nullable
        public static com.google.android.gms.auth.api.credentials.Credential buildCredential​(@NonNull
                                                                                             com.google.firebase.auth.FirebaseUser user,
                                                                                             @Nullable
                                                                                             String password,
                                                                                             @Nullable
                                                                                             String accountType)
        Build a credential for the specified FirebaseUser with optional password and IdpResponse.

        If the credential cannot be built (for example, empty email) then will return null.

      • buildCredentialOrThrow

        @NonNull
        public static com.google.android.gms.auth.api.credentials.Credential buildCredentialOrThrow​(@NonNull
                                                                                                    com.google.firebase.auth.FirebaseUser user,
                                                                                                    @Nullable
                                                                                                    String password,
                                                                                                    @Nullable
                                                                                                    String accountType)
        See Also:
        buildCredential(FirebaseUser, String, String)