The verse permitting mutah was revealed in the Book of Allah, and we practiced it during the time of the Messenger of Allah ﷺ. No Quranic verse was revealed forbidding it, nor did he prohibit it before he died. Then a man said whatever he wished according to his own opinion.
حدثنا مسدد حدثنا يحيى عن عمران أبي بكر حدثنا أبو رجاء
أنزلت آية المتعة في كتاب الله ففعلناها مع رسول الله ﷺ ولم ينزل قرآن يحرمه ولم ينه عنها حتى مات قال رجل برأيه ما شاء