There were two forms of mutah practiced during the time of the Prophet ﷺ, but Umar, may Allah be pleased with him, forbade us from them, so we stopped.
حدثنا عبد الصمد حدثنا حماد عن عاصم عن أبي نضرة
متعتان كانتا على عهد النبي ﷺ فنهانا عنهما عمر رضي الله تعالى عنه فانتهينا
Its isnad is sahih, and it has occurred often before, see 2879.