Under federal law are certain specific protected classes of employees. Discrimination in hiring/firing decisions based on any of these classes is illegal. They are:
Race.
Color.
Religion or creed.
National origin or ancestry.
Sex.
Age.
Physical or mental disability.
Veteran status.
Genetic information.
Citizenship
Everything else is fair game. Sexual orientation is a perfectly legitimate reason to fire someone under current federal law.
Since inly democratic politicians express any concern that this is a problem this is one of the reasons that lgbt people vote heavily democratic. If their state doesnt have a nondiscrimination law that includes sexual orientation keeping their job may be at risk. An example. I have a friend in NY state who taught music at a catholic elementary school. After NY legalized same sex marriage but before it became legal across the country, he married his long term partner. Previously the school had known of the partner’s existence but turned a blind eye. Once they were married they fired him for being gay because they felt that they could no longer turn a blind eye to his sexual orientation.