WiFi.config(...) parameter order

You're not using the right documentation, the documentation you linked to is for the Arduino WiFi library that comes with WiFi-enabled official Arduino boards. You need the documentation for ESP32: