Critique of Judgement by Immanuel Kant Chapter 87 Page 12

If, conversely, as a believer [in God] he performs his duty according to his conscience, uprightly and disinterestedly, and nevertheless believes that he is free from all moral obligation so soon as he is convinced that there is no God, this could accord but badly with an inner moral disposition.

We may then suppose the case of a righteous man [e.g. Spinoza], who holds himself firmly persuaded that there is no God, and also (because in respect of the Object of morality a similar consequence results) no future life; how is he to judge of his own inner purposive destination, by means of the moral law, which he reveres in practice? He desires no advantage to himself from following it, either in this or another world; he wishes, rather, disinterestedly to establish the good to which that holy law directs all his powers.