How to pass current WiFi credentials (SSID and Password) to another device like thes guys do it (video)

Essentially how is this possible, to share device SSID and Password to the netmo thermostat without going through apple homkit? (as seen in the video)

And can it be done without bluetooth but connecting directly to a device broadcasting a wifi network?


https://youtu.be/YExHjnmVIu4