However, I realised there's no standard way for the
client to know what its
username and password is once the registration is complete. The old IBR
spec (XEP-0077) uses special <username/> and <password/> fields which the
client can automatically save to avoid the user having to re-enter it.
https://xmpp.org/extensions/xep-0077.html#registrar-formtypes defines a form
that can be used in any context (ad hoc, etc) with standardized names for
the common things one might want at registration, including password.