I have a my_wifi_access_point setup and it's password protected. My phone is connected to the wifi using the password I set. This is a typical home wifi scenario.
What if a malicious user comes along and also setup a wifi with the same ssid near my phone, and lure my phone connecting to it. That way it can get the password from my phone and later use it to access my_wifi_access_point. How does wifi work to prevent this from happening?