St. John Eudes (d. 1680): Good works and prayers outside the Catholic Church do not lead to salvation
Source: Saint John Eudes (d. 1680), Contract of Man with God through Holy Baptism
The holy Catholic Church has never tolerated and will never tolerate differing beliefs regarding any article. Her faith is the same in all times, in all places, and in all her true children. Thus her faith is one, and the only one that is true.
You must be all the more careful to preserve this faith in all its purity, because without it, it is impossible to do anything that merits heaven: Sine fide impossibile est placere Deo.
Those who do not have it may well practice all moral virtues, justice, sobriety, chastity, almsgiving, prayer, mortification, this is observed not only among heretics, but also among Muslims and pagans. But all these good actions, not having faith as their principle, are not capable of meriting heaven for them. The Law of Moses, holy as it was, could only save those who observed it by faith.
So when you observe that those who do not believe in the Church practice many good works, say many prayers, lead an austere life, do not therefore believe that they are on the path to salvation, nor that one can be saved in their belief; you would be committing a grievous sin, because that would be to believe that one can be saved outside the Church, that one can have faith without believing in the Catholic Church, or that one can be saved without faith.