MultiFactorInfo.fromResponse constructor

MultiFactorInfo.fromResponse(
  1. GoogleCloudIdentitytoolkitV1MfaEnrollment response
)

Implementation

MultiFactorInfo.fromResponse(
  auth1.GoogleCloudIdentitytoolkitV1MfaEnrollment response,
)   : uid = response.mfaEnrollmentId.orThrow(
        () => throw FirebaseAuthAdminException(
          AuthClientErrorCode.internalError,
          'INTERNAL ASSERT FAILED: No uid found for MFA info.',
        ),
      ),
      displayName = response.displayName,
      enrollmentTime = response.enrolledAt
          .let(int.parse)
          .let(DateTime.fromMillisecondsSinceEpoch);