Touch ID for sudo in Ghostty and zellij

How to get the Touch ID prompt to work with sudo on macOS, including the pam_reattach workaround needed inside terminal multiplexers like zellij and tmux.