It seems to me that one of the major flaws of Wifi is that computers will auto-reconnect to a Wifi that merely has the same name as one you connected to in the past i.e. an evil twin. While perusing log files I've seen this happen and it is a surprising design flaw. There ought to be something more substantial than just an access point name to authenticate a Wifi router as being one that the computer spoke with in the past. Why does Wifi auto-reconnect based on only the access point name? Why isn't there a shared secret?
UPDATE I should describe what I saw that made me ask this question.
- I was on a train at one point, I can't remember the country, I had come from an airport where I'd been in a lounge that had free Wifi, no password, but there was a "captive portal" login screen.
- I noticed on the train, which was by then far from the airport, that my computer Wifi had once again connected to the airport lounge Wifi.
- I checked the log and indeed, a "fake" Wifi hotspot with the same name but a different MAC address was there and DHCP had provided me with an IPv4 address.