The code for all that is just PHP. It is all in GitHub at https://github.com/pfsense/pfsense and in your pfSense box (Diagnostics->Edit File). Copy the relevant files, edit them, save them on a system you can play with, get it working…
/usr/local/www/interfaces.php - has some stuff for entering directly PPTP/L2TP username password...
/usr/local/www/interfaces_ppps_edit.php - entering username password... for L2TP on PPP (I think that is what you want)
It sounds like you understand what is needed, so have a look at that code and you can add an extra field for the shared secret.
Then look in
/etc/inc/interfaces.inc function interface_ppps_configure($interface)
That writes the config file/s for that stuff.
Lines like:
set auth authname "{$ppp['username']}"
Put the parameters in the config file.
Add your new parameter there somewhere.
When it is working, make a pull request online in GitHub (just make the few edits in the GitHub webGUI is easy).
Then everyone in South Africa and elsewhere gets the benefit.