Closed yashasip closed 6 months ago
/
label
There is a / that is appended at the end of the label. As a result, in the authenticator apps, label ends with /.
For the URI generated using this below:
URI
import dev.turingcomplete.kotlinonetimepassword.OtpAuthUriBuilder import org.apache.commons.codec.binary.Base32 fun main() { val authURI = OtpAuthUriBuilder.forTotp(Base32().encode("secret".toByteArray())) .label("John", "Company") .issuer("Company") .digits(8) .buildToString() println(authURI) }
Generated URI: otpauth://totp/Company:John/?issuer Company&digits=8&secret=ONSWG4TFOQ
otpauth://totp/Company:John/?issuer Company&digits=8&secret=ONSWG4TFOQ
After scanning the QR code generated using the above URI the key entry as seen on the authenticator app (Google Authenticator):
This PR fixes this bug.
Thanks for the fix!
Rogue
/
Appears at the End of thelabel
There is a
/
that is appended at the end of thelabel
. As a result, in the authenticator apps,label
ends with/
.For the
URI
generated using this below:Generated URI:
otpauth://totp/Company:John/?issuer Company&digits=8&secret=ONSWG4TFOQ
After scanning the QR code generated using the above
URI
the key entry as seen on the authenticator app (Google Authenticator):This PR fixes this bug.