Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

People who want to visit the United States could be asked to hand over their social-media passwords to officials as part of enhanced security checks, the country's top domestic security chief said.

Homeland Security Secretary John Kelly told Congress on Tuesday the measure was one of several being considered to vet refugees and visa applicants from seven Muslim-majority countries.

"We want to get on their social media, with passwords: What do you do, what do you say?" he told the House Homeland Security Committee. "If they don't want to cooperate then you don't come in."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

His comments came the same day judges heard arguments over President Donald Trump's executive order temporarily barring entry to most refugees and travelers from Syria, Iraq, Iran, Somalia, Sudan, Libya and Yemen.

Kelly, a Trump appointee, stressed that asking for people's passwords was just one of "the things that we're thinking about" and that none of the suggestions were concrete.

Homeland Security Secretary John Kelly testifies before the House Homeland Security Committee on Tuesday. Andrew Harnik / AP

Under the existing vetting process, according to Kelly, officials "don't have a lot to work with," relying on the applicant's documentation and asking them questions about their background.

He said this was even more problematic when dealing with so-called "failed states" such as Syria or Somalia, where infrastructure and record-keeping has been degraded by conflict.

"When someone says, 'I'm from this town and this was my occupation,' [officials] essentially have to take the word of the individual," he said. "I frankly don't think that's enough, certainly President Trump doesn't think that's enough. So we've got to maybe add some additional layers."

As well as asking people for their passwords, Kelly said he was looking at trying to obtain people's financial records.

"We can follow the money, so to speak. How are you living, who's sending you money?" he said. "It applies under certain circumstances, to individuals who may be involved in on the payroll of terrorist organizations."

Obtaining visitors' passwords was considered by top officials at the Department of Homeland Security under the Obama administration, but the policy was never adopted, according to an internal department memo obtained by MSNBC in 2015.