Even the best doughnuts in America might not have been worth it.

I had left Dottie's Diner in Connecticut with a heavenly powdered doughnut that pretty much lived up to its billing.

But more than three hours later and 150 miles away, I discovered I'd also left my wallet. And I had a flight back to D.C. early the next morning that would require me to present my ID.

What to do?

As I learned from firsthand experience earlier this month, you can board a plane without identification and get through Transportation Security Administration (TSA) screening, though not without some hassle. Here are some tips on getting through it:

Getting on the plane

Get to the airport early. That's trickier, of course, when you've lost your wallet. I had to take an Uber to get to Boston's Logan International Airport because I couldn't board public transit or pay for a cab without a subway fare card, credit card, ATM card or cash - all of which were in my wallet back at Dottie's.

When I arrived at the TSA checkpoint, I told the agent there that I didn't have my driver's license. He pulled me aside right away and asked what other forms of identification I was carrying. I showed him what I had in my backpack: an ID for work that had my photograph but not my name; some documents with my name but not my photograph; an image of my driver's license that I had stored on my cellphone. He said none of those were acceptable. Only a physical item with both a photo and a name would do.

Then he called a phone number, reaching a database that somehow had lots and lots of information about me. To prove that I was indeed the person who matched that data, the TSA agent asked me to list several of my previous addresses. He asked me to state when I lived at each one. He asked for my brother's name and birthday. He asked for the last four digits of my parents' phone number.

That worked: The agent said I had verified my identity. I was too relieved to wonder much about how the TSA knew so much about me, and by then I was on to the next step. I had to go through the metal detector and then the most thorough pat-down and bag search I've ever been through. I submitted to an examination of every little fold of my clothing without complaint; it was only when an agent insisted on opening up the beautifully wrapped wedding gift I had purchased for a friend that I objected. The TSA agent opened it anyway.

Traveling without ID or money

The flight there was fine, though a little thirsty - I couldn't bring a water bottle through security and couldn't find a working airport water fountain before boarding. After we took off, I discovered that Spirit Airlines doesn't give out free cups of water during a flight, and I couldn't buy a drink without money.

When I landed at Baltimore-Washington International Marshall Airport, I wasn't home free yet. I still needed to catch a MARC train from BWI, and I still didn't have any money with me.

I was thinking about just getting on the train and pleading my case with a conductor, but then a man asked me if I knew how to work the ticket machines.

"Well, yes, I can help," I told him brightly. "And would you mind buying a ticket for me too? I can Venmo you the money."

He agreed, and I sent him the $7 by Venmo, since, thankfully, I did have my smartphone.

I presume this went better for me than it might have for other people stuck in the same situation. I'm white and fluent in English. I happened to be a small woman asking a tall man, so I wasn't physically intimidating to him. If the situation were reversed, I wondered if I would have helped him out.

I also realized that, for me, not having any ID for a few days was just a hassle. That's nothing compared to what undocumented immigrants deal with. Hundreds of American citizens in the District of Columbia and around the country also have much worse problems getting ID.

The train got me to Washington's Union Station. From there, instead of attempting to board a bus or subway, I simply walked to The Washington Post's newsroom.

I was really thirsty by this point. On my 30-minute walk to The Post, I eventually found a store that accepts LevelUp, a payment app I already had on my phone, so I could get water without cash or a credit card.

After it was all over, I called the TSA with some questions. I wanted to know about just who it was on the other end of the line when that agent made the phone call. TSA spokesman Michael McCarthy told me that the agent had called Secure Flight, a TSA office near Annapolis where agents process the name, date of birth and gender of every person who buys a plane ticket. Part of the office's duties is to tell airlines whether any passengers are on any terrorist watch lists. The employees at Secure Flight can also log into a commercial database - the same one that credit card companies use - to find a thorough profile of almost any adult's previous addresses and other information.

It also turns out that I'm far from the only absent-minded traveler.

"This happens every day," McCarthy told me.

Preventive measures

This could happen to you. So here's what you should do, right this minute, before you lose your wallet:

- Take out your driver's license.

Take out your phone.

Now take a picture.

Have you done it? Really, do it right now. I happened to take a picture of my driver's license just a few days before losing my wallet, and without that photo on my phone, the whole ordeal would have been even more difficult. The airport wasn't the only time I was asked for my ID - it turns out everything from picking up an order at Target to visiting a college dorm requires it.

- Keep a cash stash and a secret credit card.

When I finally made it back from the airport that day, I had some cash and a credit card that I had stored at home. I recommend keeping some money in a place that's not your wallet, and perhaps even traveling with your money in two different places.

- Make use of your smartphone.

Download apps such as Uber or Lyft, LevelUp, Apple Pay and your bank's app - anything that might let you act like you have money when you just have a phone.

Be prepared. And also, when you're enjoying those great Connecticut doughnuts - remember to keep a hold of your wallet.