Allah (SWT) made their faith firm and steady because they stood firm with faith requirements and did not follow or become friendly with the enemies of Allah even if they were close family to them.
22. You will not find any people who believe in Allâh and the Last Day, making friendship with those who oppose Allâh and His Messenger, even if they were their fathers or their sons or their brothers or their kindred (people). For such (believers) He has confirmed Faith in their hearts, and strengthened them with Rûh (proofs, light and true guidance) from Himself. And He will admit them to Gardens (Paradise) under which rivers flow to dwell therein (forever). Allâh is pleased with them, and they with Him. They are the Party of Allâh. Verily, it is the Party of Allâh that will be the successful.
[Al-Mujadala (58), Verse 22]