A “social contract, in political philosophy, is an actual or hypothetical compact, or agreement, between the ruled or between the ruled and their rulers, defining the rights and duties of each.”
While on the surface, this seems to apply to the bay’ah contract, as Ulrika Martensson has mentioned, the “social contract” is not in line with Islamic thought because the premise in the “social contract” is that man is sovereign (Rouseau), whereas in Islam the sharia is sovereign.
Shahrough Akhavi elaborates on this point: “Although social-contract theorists differ on a number of points, they concur that human beings choose to form associations to promote their interests. An important corollary is that tension exists between the individual’s inherent independence and freedom and the authority to which she or he must submit to achieve compliance with the goals of the contract. Occasionally, a theorist discusses God in the overall scheme of things, but the conception is deistic, so that the God who created the world does not intervene in its operation. For the rest, contractarian theories privilege natural law and natural rights, according to which the individual is treated as a social being who is fully rational, free, and independent. Fundamentally, three steps are taken in the process of making the social contract: (1) creating society; (2) creating the sovereign state; (3) discharging obligations and enjoying benefits.
Because mainstream Ash’ari Sunni Islam views God as continuously intervening in the operation of the universe and insists on the human being’s “acquisition” of his or her actions from such a God, it did not generate a theory of social contract. The theory was introduced in the 19th century as a convention to the Muslim world, when reformers such as the Egyptian Azharite scholar Rifa’ah Rafi’ al-Tahtawi (d. 1873) and the Young Ottoman writer Namik Kemal (d. 1888) became interested in contractarian theorists. This is not to say that Muslim traditions lack ideas and concepts that are important to the elaboration of a theory of social contract, such as justice, obligation, mutuality, and interests. But, before the 19th century, jurists would not have referred to individual Muslims ceding their discrete interests to the community as a whole and converting them into a collective interest for which that community would be the trustee.”
 Martensson, U. (2017). Social Contract Theory in Islamic Sources?. Comparative Islamic Studies, 10(2), 129–136. https://doi.org/10.1558/cis.32431
 It is important to note that the concept of sovereignty (السِيادَة) is a political and legal concept, i.e. related to temporal life (dunya) and not the hereafter. The Qur’an uses the word ٱلْمُلْكَ which is sometimes translated as sovereignty. This is completely different to the word السِيادَة which in origin is a western term.
 Akhavi, Shahrough. “Sunni Modernist Theories of Social Contract in Contemporary Egypt.” International Journal of Middle East Studies 35, no. 1 (2003): 23–49. http://www.jstor.org/stable/3879926