Geary Act

The Geary Act was a United States law that extended the Chinese Exclusion Act of 1882 by adding onerous new requirements. It was written by California Representative Thomas J. Geary and was passed by Congress on .
The law required all Chinese residents of the United States to carry a resident permit, a sort of internal passport. Failure to carry the permit at all times was punishable by deportation or a year of hard labor. In addition, Chinese were not allowed to bear witness in court, and could not receive bail in "habeas corpus" proceedings.
The Geary Act was challenged in the courts but was upheld by the United States Supreme Court in an opinion by Justice Horace Gray, "Fong Yue Ting v. United States", 149 U.S. 698, 13 S. Ct. 1016. 37 L.Ed. 905 (1893), Justices David Josiah Brewer, Stephen J. Field, and Chief Justice Melville Fuller dissenting.
The Chinese Exclusion Acts remained in force until partly modified by the Magnuson Act in 1943, which slightly opened up Chinese immigration and permitted naturalization. 
Background.
Chinese immigrants came to the U.S. in large numbers during the California Gold Rush and in the 1860s when the Central Pacific Railroad recruited labor to build its portion of the Transcontinental Railroad. Once gold became more scarce and labor more competitive, white hostility to the Chinese (as well as other foreign laborers) intensified in the West. This hostility eventually led to the passage of anti-Chinese immigration laws, such as the Page Act of 1875 and the Chinese Exclusion Act of 1882. The Act excluded Chinese "skilled and unskilled laborers and Chinese employed in mining" from entering the country for ten years under penalty of imprisonment and deportation, as well as denying U.S. citizenship to Chinese immigrants. The Act effectively began immigration enforcement at the border because prior to the passage of the Page Act and Chinese Exclusion Act, there existed no trained officials and interpreters, nor the bureaucratic machinery with which to enforce immigration restriction laws or an effort to document and track the movements and familial relationships of immigrants. These types of policies implemented in the Page and Chinese Exclusion Acts have largely been seen as due to what Erika Lee depicts as Government officials' deep "suspicion Chinese were attempting to enter the country under fraudulent pretenses".
The Act.
The original Exclusion Act of 1882 only excluded Chinese laborers for a period of 10 years. Following the Exclusion Act of 1882 and other amendments, such as the documentary requirement changing 1884 amendment, efforts were sought to crack down on illegal entry and residence of Chinese in the U.S. When the 1882 Act expired in 1892, Californian Democratic Senator Thomas Geary sponsored the Act's renewal and so the extension provision was named after him.
The Geary Act, besides renewing the exclusion of Chinese laborers for another 10 years, also outlined provisions that required Chinese already in the U.S. to possess "certificates of residence" (as well as "certificates of identity" after the McCreary amendment was added) that served as proof that they entered the U.S. legally and had the right to remain in the country. The certificates of residence were to cost no more than $1($17.58 in today's money) and contained the name, age, local residence, occupation, and photograph of the applicant. The act placed the burden of proof of their right to be in the U.S. on the Chinese themselves, denied bail to Chinese in habeas corpus proceedings, made it the duty of all Chinese laborers in the U.S. to apply within one year for a certificate of residence, with a duplicate kept in the office of the Collector of Internal Revenue, and suitable penalties were prescribed for any falsification of certificates. Another of the Act's provisions required two white witnesses to testify to a Chinese person's immigration status. If any Chinese laborer within the United States without this certificate of residence was "deemed and adjudged to be unlawfully in the United States", they could be arrested and forced to do hard labor, and be deported after a year. This was the first time ever illegal immigration to the U.S. was made punishable by such a harsh degree.
Even though this Act seems to have granted no concessions to Chinese immigrants whatsoever, historians such as Elmer Clarence Sandmeyer have noted that many Californians were disappointed that the Act did not achieve total exclusion. Although the Act stated that these certificates – as well as similar "certificates of identity" later created by the then newly formed Bureau of Immigration to document all Chinese who were actually exempt from the Exclusion and subsequent Geary Acts (for example merchants, teachers, travelers, and students) – were supposed to serve as "indubitable proof of legal entry", the documents did not function to protect legal immigrants and residents from government harassment. As Erika Lee describes, because the Act required all Chinese to possess the certificates, the entire Chinese community in the U.S. – including immigrants and residents who were supposed to be exempt from the exclusionary laws – was exposed to the same level of constraint and inquiry governing Chinese laborers. This unprecedented level of inquiry was motivated by the prejudiced view that it was, as Senator Geary said, "impossible to identify [one] Chinaman [from another]". No other immigrant group were required to hold documents proving their lawful residence until 1928, when 'immigrant identification cards' were first issued to any new immigrant arriving for permanent residence. These were replaced by green cards, officially called Alien Registration Receipt Cards, after 1940. Such "gatekeeping" in Lee's characterization was rooted in "a western American desire to sustain white supremacy in a multiracial West".
Reaction.
The "Los Angeles Herald" strongly supported the Act and its certification provision, stating in an editorial that "nearly all civilized nations have had until lately a very rigid system of passports in which a very exact personal description of the bearer formed a part."
Within a few months of the implementing the Act, Chinese in the U.S. began organizing to resist the enforcement of the law. The heads of the Six Companies, the San Francisco branch of The Chinese Consolidated Benevolent Association, proclaimed that the Chinese in the U.S. ought not register, but rather contribute to a fund for hiring of lawyers to fight the law on the ground of unconstitutionality. The effort was overwhelmingly successful (only 3,169 of the estimated 110,000 Chinese in the country had registered by the April 1893 deadline), yet newspaper coverage of the protest reported Chinese as being slaves to doing whatever The Six Companies told them to do.
Resistance came from outside the West of the country as well. The Chinese Equal Rights League in New York and Brooklyn pleaded that its members to help their fellow countrymen, and enrolled some 150 English-speaking Chinese merchants and professionals in New York. Its leaders argued that by making Chinese immigrants pay the "illegal costs and expenses" of enforcing the law, the bill imposed taxation without representation. The Chinese Equal Rights League was able to gain much support from whites on the East Coast, as on September 22, 1892, more than one thousand U.S. citizens joined some two hundred Chinese merchants and laborers at Cooper Union in Manhattan to protest the Geary Act.
Several Chinese that refused to register for their certificate of residence brought suit that, upon appeal, was brought before the Supreme Court in "Fong Yue Ting v. United States" in 1893. Among some of the questions brought before the Court was whether the Act violated the 1868 Burlingame Treaty with China, whether hard labor and deportation constituted cruel and unusual punishment and thus violated the Eighth Amendment, whether the Act violated Fifth and Sixth Amendments protections by permitting imprisonment with hard labor without prior indictment or jury trial, whether the act violated the Fourteenth Amendment's prohibition against the taking of property or liberty without due process, among other issues. The Court's 5 to 3 decision, delivered by Justice Horace Gray, ruled that the if the U.S. as a sovereign nation had the power to exclude any person or any race it wished, it also must be able to deport any person or race it wished, and thus upheld the Geary Act. 
The Geary Act provisions for imprisonment and forced labor were invalidated by "Wong Wing v. United States" in 1896. The Supreme Court ruled that with respect to criminal penalties non-citizens have rights to courts and due process under the Fifth and Sixth Amendments. However the government could still detain people pending deportation.
Upon hearing the decision, the Chinese Consulate, the Six Companies, and many Chinese in the U.S. stated that they refused to pay their way back to China if deported, thus leaving the U.S. government financially responsible. The Chinese Government also informed the U.S. that if it acted on the law, it would end all relations – diplomatic and economic – with the U.S. Additionally, since Congress did not write any provisions granting money to pay for, and thus enforce, deportations, the Act as was rendered moot until it was amended through the McCreary amendment (named after the senator who proposed it) to appease the Chinese government, but did so only by providing an additional six months for Chinese to register for the residency certificates. Even with the amendment, Congress only appropriated several hundred thousand dollars to the law's enforcement.
Despite the U.S. Supreme Court's ruling on the constitutionality of the law, there were practical problems with implementation. Nationally, only 13,242 Chinese laborers registered, about 14 percent of those subject to the law. The cost of arresting and deporting as many as 85,000 unregistered Chinese was estimated at more than $7 million, but Congress had authorized only $60,000 and failed to provide a mechanism for deportation within the Geary Act. When Ny Look, a Chinese Civil War veteran was arrested in New York for failure to register, Judge Emile Henry Lacombe of the U.S. Circuit Court in the Southern District of New York, ruled in In re Ny Look that there were no deportation provisions in the law and Look could not be detained indefinitely therefore he should be released. These problems led to the passage of an amendment, known as the McCreary Amendment, which provided an additional six months for Chinese to register, as well as additional restrictions such as photographs on the registration certificates.