Nikah Mutah
You can read their sources for the answer. You may find this link helpful https://www.al-islam.org/muta-temporary-marriage-islamic-law-sachiko-murata/legitimacy-muta