What did John Calvin believe about salvation outside of the church?
He writes in book IV of the Institutes:
But because it is now our intention to discuss the visible church, let us learn even from the simple title “mother” how useful, indeed how necessary, it is that we should know her. For there is no other way to enter into life unless this mother conceive us in her womb, give us birth, nourish us at her breast, and lastly, unless she keep us under her care and guidance until, putting off mortal flesh, we become like the angels [Matthew 22:30]. Our weakness does not allow us to be dismissed from her school until we have been pupils all our lives. Furthermore, away from her bosom one cannot hope for any forgiveness of sins or any salvation, as Isaiah [Isaiah 37:32] and Joel [Joel 2:32] testify. Ezekiel agrees with them when he declares that those whom God rejects from heavenly life will not be enrolled among God’s people [Ezekiel 13:9]. On the other hand, those who turn to the cultivation of true godliness are said to inscribe their names among the citizens of Jerusalem [cf. Isaiah 56:5; Psalm 87:6]. For this reason, it is said in another psalm: “Remember me, O Jehovah, with favor toward thy people; visit me with salvation: that I may see the well-doing of thy chosen ones, that I may rejoice in the joy of thy nation, that I may be glad with thine inheritance” [Psalm 106:4-5 p.; cf. Psalm 105:4, Vg., etc.]. By these words God’s fatherly favor and the especial witness of spiritual life are limited to his flock, so that it is always disastrous to leave the church.