You can be detained and deported without first seeing a judge.
It's been that way for over 40 years so yes, according to Congress/SCOTUS, this is legal.
"The majority stakes the largest detention initiative in American history on the possibility that ‘seeking admission’ is like being an ‘applicant for admission,’ in a statute that has never been applied in this way, based on little more than an apparent conviction that Congress must have wanted these noncitizens detained — some of them the spouses, mothers, fathers, and grandparents of American citizens,” she added. “Straining at a gnat, the majority swallows a camel.”
https://www.courthousenews.com/fifth-circuit-upholds-trump-a...
Subsection (b)(2)(A) then says: "Subject to subparagraphs (B) and (C), in the case of an alien who is an applicant for admission, if the examining immigration officer determines that an alien seeking admission is not clearly and beyond a doubt entitled to be admitted, the alien shall be detained for a proceeding under section 1229a of this title."
josefritzishere•1h ago
pixl97•1h ago