This would allow using another QR code generator, including a JS solution.
/**
* Return the otpauth part of the QR image. This can be used to generate the QR code within this app or outside
* (e.g. JS generator)
*
* @param keyId
* Name of the key that you want to show up in the users authentication application. Should already be
* URL encoded.
* @param secret
* Secret string that will be used when generating the current number.
*/
public static String otpauthUrl(String keyId, String secret) {
StringBuilder sb = new StringBuilder(128);
sb.append("otpauth://totp/").append(keyId).append("%3Fsecret%3D").append(secret);
return sb.toString();
}
This would allow using another QR code generator, including a JS solution.