I wonder what happens if you refuse to give your password, period. Excuse me, officer, do you have a reasonable suspicion that I’ve committed an immigration violation or crime? What’s your name and number? They detain you indefinitely? Deport you??? Port of entry is US government property, not “abroad”.
The government asserts that agents at ports of entry don’t need any suspicion to search electronic devices like computers and phones. However, agents do need reasonable suspicion to hold a device for an extended period of time or do invasive searches of that device.