Martin Luther famously had doubts about the canonicity of the epistle of St. James. This is because St. James rather clearly affirms that faith without works is dead faith, so that Luther’s notion of sola fide can only be maintained by means of some exegetical gymnastics. But James is not the only book of the Bible that should have troubled him. He should have been troubled by Jeremiah too.
I, Yahweh, search the heart, test the motives, to give each person what his conduct and his actions deserve. (17:10, NJB)
I can’t think of many—if any—passages of Scripture that are as unambiguous as this in associating both faith and works with our eternal reward. It is not enough to do the right thing for the wrong reasons, and it is not enough to have good motives if they do not match your actions. The two go together, just as St. James said.
What God says in this verse from Jeremiah is a matter of simple justice: people receiving their due. If they have done good, then they are rewarded; if not, they are punished. Thus this verse contradicts not only the Protestant’s sola fide; it also refutes the Protestant mistake of supposing that God does not reward us according to our deeds.