I know Islam is strictly against LGBT people but what about intersex people? Do they classify as men or women in Sharia? There are different laws for men and women so which laws do intersexual people follow? I'm looking for answers to questions like if a intersex person looks like a male but has female anatomy then will he need a mahram to go on Hajj. If someone was intersex and looked like a male but had female body parts, should he/she follow female laws or male? Who can they pray with (males or females)?
What is the Islamic view on intersexual people?
Various fatawa give algorithms for classifying intersex people as "male" or "female", and they follow the fiqh of that gender (which affects marriage, inheritance, praying in a mosque, and so on). Surgery is considered permissible (and encouraged to varying degrees) to match the classification.
Some fatawa allow the possibility of "neither" (male nor female), in especially rare cases, and they obey a cautious fiqh (e.g., marriage is not allowed).
I did not find a fatwa saying "you're fine they way you are".
Islam Q&A give an method to whether someone is "male" or "female", and conditions on getting married. They write e.g.:
The majority of fuqaha’ are of the view that with regard to the intersex individual before puberty, if he urinates from a penis, then he is a boy; if he urinates like a girl, then this person is female.
IslamWeb also discuss "bisexual" (meaning "intersex") people. Like Islam Q&A, they consider urination as an important factor, but also sperm vs. menses, sexual attraction, and secondary sex characteristics. They have other fatawa about why Allah created intersex people and a sex-change operation for an intersex person.
AskImam includes the possibility of considering a person as neither male nor female:
In a case where distinction is impossible, then the hermaphrodite will neither be considered a male nor female. A hermaphrodite's Salaat should be performed in between the Saffs of males and females.
Darulfiqh.com (sourced from IslamQA.org) also includes this possibility:
If none of these signs transpire, the hermaphrodite will remain a hermaphrodite. According to Imam Sarakhsi rahimahullah, it is virtually impossible for some of the above signs not to manifest.
A hermaphrodite’s marriage will be not be valid until the gender is ascertained. ...
With regards to inheritance, a hermaphrodite will receive the share which is the lesser amount of the possible shares. In every scenario, the hermaphrodite will be envisaged a male and female, in whichever state the hermaphrodite receives less, the hermaphrodite will be treated as that gender for that particular scenario and subsequently given that share.
More fatawa on this topic are available from: alifta.net, AboutIslam, and drhatemalhaj.com.