Final answer:
Title VII of the Civil Rights Act prohibits discrimination based on sexual orientation.
Step-by-step explanation:
The federal law that prohibits discrimination based on sexual orientation is Title VII of the Civil Rights Act. In a 2020 Supreme Court ruling, it was determined that the prohibition against discrimination based on sex in Title VII includes discrimination based on sexual orientation and gender identity. Therefore, it is now illegal to fire someone based on their sexual orientation or gender identity.