Can a Masum (as) offer Salah before a ghayr e masum?
All I wanna know about this is because I’m a Sunni converted to Shia and as far as I have learned a Masum can’t offer prayers before a ghayr e Masum. But I was kinda astonished because my Shia friend said that Imam Ali (as) offered namaz before Second Caliph

Kindly Clarify this issue

Sometimes the Imams would have to practice Taqiya, in order to preserve the order and preserve their life. Imam Ali would go to the masjid and pray behind the others sometimes for those reasons.