There are many reports [1] of this unsolved issue: external iOS keyboard (bluetooth or smart connector) works until authentication to some WiFi captive portals.
Theoretically speaking, how is this possible? Could a wifi access point send incorrect management frames that affect the hardware chip that handles both WiFi and Bluetooth on iDevices? Why would that affect non-bluetooth keyboards that are physically attached via Smart Connector?
[1] https://discussions.apple.com/thread/8075772