The Treasury Department and the IRS ruled Thursday that all legally married same-sex couples will be allowed to file joint federal taxes even if they live in states they do not recognize same-sex marriage.

‘‘Today’s ruling provides certainty and clear, coherent tax filing guidance for all legally married same-sex couples nationwide,’’ Treasury Secretary Jacob Lew said, Boston Globe reports. “This ruling assures legally married same-sex couples that they can move freely throughout the country knowing that their federal filing status will not change.”

The Department of Health and Human Services also ruled Thursday that same-sex couples, regardless of state, are now eligible for Medicare benefits that only married couples receive.

These two rulings are huge steps towards overall federal recognition of same-sex marriages, but not all aspects of the government are helping same-sex couples.

According to Washington Post, Social Security does not allow marriage benefits to same-sex couples if they do not reside in a state where same-sex marriages are recognized.

Edie Windsor, a woman in a same-sex marriage, was forced to pay federal estate taxes after her wife died. She filed a case, which is how this consensus got to the Supreme Court.