Marriage refers to two things - (1) a legal contract between two people, mediated by the state, and (2) societal and/or religious acceptance of two people as a married couple. Nowadays, in most parts of the world, only the first matters for most purposes. So the state should recognise all marriages, but religions and society are free to have their own conditions as long as they do not harass people they don’t like.