New enough versions of Tor should already have export a SOCKS_USERNAME and SOCKS_PASSWORD along with circuit control events.
https://github.com/torproject/tor/blob/e3b1e617ae4850280012c95f40e54acdfc897855/src/feature/control/control_fmt.c#L144-L158
We should