The federal government says it recognizes same-sex marriage, but lesbian and gay veterans in 31 states are still missing out on thousands of dollars in benefits.

And now they're suing for those rights.

Law firm Lambda Legal filed a lawsuit last month against the Secretary of Veterans Affairs on behalf of the American Military Partner Association, arguing that equal benefits must be provided to all employees no matter where they live.

60-year-old Steven Rains was married to a veteran, Don Condit, who passed away from cancer last year.

They had been together for 30 years, and the last thing Rains wanted to think about was money. But money was tight.

Gay military widow not getting death benefits

Because Condit's condition was linked to chemical exposure while serving in Vietnam, his spouse should be eligible for death benefits known as indemnity compensation.

But though they were legally married in California, they lived in Texas, where same-sex marriage isn't legal. Rains is therefore being denied those $1,215 per month payments.

Rains would also like to downsize and find a smaller house, but he doesn't qualify for a VA loan, which typically come with favorable rates for veterans and their spouses.

Map: Where same-sex marriage is and isn't legal

"If I got those benefits, I wouldn't have to worry that some day I'm going to lose my house because I can't afford the upkeep or the taxes, and at 60 years old even temporary work is difficult to find," he said. "I just want what anybody else my age, in my situation would get. I'd rather have Don back, but that's not possible. These other things are."

Some federal agencies, like the IRS, now grant benefits based on the state where a couple was married.

The VA says it is bound by a separate federal law requiring it to define marriage based on the state where a couple resided at the time of marriage or at the time benefits are due.

Flipboard: Same-sex marriage - 1 year later

The fate of military couples therefore hinges on the outcome of this lawsuit, as well as the changing landscape of state same-sex marriage laws. As a growing number of states are overturning same-sex marriage bans, the Supreme Court is even being urged to rule on whether state bans are unconstitutional -- spurring hope in people like Rains, who is adamant that more action is still needed.

"People think that now that DOMA is overturned, everything is well and good, and that everything is wonderful," said Rains. "But we're just not there yet."

Another widow is being denied benefits even though same-sex marriage is now legal in their state. Joe Krumbach, from Vashon Island, Washington, says he is unable to receive survivors benefits because his partner, Jerry Hatcher, passed away in 2008, about four years before Washington legalized same-sex marriage.

Related: Big businesses still fighting for same-sex marriage

He and Hatcher, an Army sergeant who served in Vietnam, had entered into the only union that was legal at the time -- a domestic partnership. And because Hatcher is no longer alive, that partnership can't be rolled over into a marriage (as others have been), now that same-sex marriage is recognized in the state.

Not only is he missing out on the $1,215 monthly payments and VA loans, but he is no longer able to shop at military post stores, where items are sold at a discount to service members and their family. He can't even be buried in the same military cemetery as Hatcher.

"Having weathered the federal government's past, longstanding discrimination against them, lesbian and gay veterans and their families find themselves once again deprived of equal rights and earned benefits by the government they served and the nation for which they sacrificed," the lawsuit against the VA states.