The same way you deal with any secrets on a desktop: OS-supported crypto, like the CryptoAPI in Windows or if you really wanted to double down on security: password based key derivation functions or physically attached crypto hardware (like Yubico devices)