Here is the teaching from Saint Basil the Great ...this is in the 4th century, after the Church had emerged from its 300 long years of persecution under the Roman Empire. His teaching was later incorporated into the canon law of the Catholic Church at an Ecumenical Council.
(Notice the typical balance of the Church Fathers - while the principle of no Sacraments and no Apostolic Succession outside the Church is clearly enunciated, Saint Basil also states very clearly that for the sake of the good of the Church "economy" may beused if it is thought necessary in the case of Baptism.)
Epistle to Amphilochius (of which the "First Canon" of Saint Basil is a shorter
---- "It seemed best to the ancients-I refer to Cyprian and our own
Firmilian-to subject all of these (Cathari, and Encratites, and Hydroparastatae)
to one vote of condemnation, because the beginning of this separation arose
through schism, and those who had broken away from the Church no longer had in
them the grace of the Holy Spirit, for the imparting of it failed because of the
severance of continuity.
"For those who separated first had ordination from the Fathers, and
through the imposition of their hands possessed the spiritual gift; but those
who had been cut off, becoming laymen, possessed the power neither of baptizing
nor of ordaining, being able no longer to impart to others the grace of the Holy
Spirit from which they themselves had fallen away. Therefore they commanded
those who had been baptized by them, as baptized by laymen, to come to the
Church and be purified by the true baptism of the Church.
"But since on the whole it has seemed best to some of those in Asia
that, by economy for the sake of the many, their baptism be accepted, let it be