fix: Detect OTP protocols case-insensitively #723
This commit is contained in:
parent
98bc4416ed
commit
a6eaf9178e
|
@ -17,9 +17,9 @@ sealed interface TotpToken {
|
||||||
url: String,
|
url: String,
|
||||||
): Either<Throwable, TotpToken> = catch {
|
): Either<Throwable, TotpToken> = catch {
|
||||||
when {
|
when {
|
||||||
url.startsWith(PREFIX_OTP_AUTH) -> parseOtpAuth(url)
|
url.startsWith(PREFIX_OTP_AUTH, ignoreCase = true) -> parseOtpAuth(url)
|
||||||
url.startsWith(PREFIX_OTP_STEAM) -> parseOtpSteam(url)
|
url.startsWith(PREFIX_OTP_STEAM, ignoreCase = true) -> parseOtpSteam(url)
|
||||||
url.startsWith(PREFIX_OTP_MOBILE) -> parseOtpMobile(url)
|
url.startsWith(PREFIX_OTP_MOBILE, ignoreCase = true) -> parseOtpMobile(url)
|
||||||
else -> {
|
else -> {
|
||||||
// By default we think that the url is a key and the token
|
// By default we think that the url is a key and the token
|
||||||
// type is otp-auth.
|
// type is otp-auth.
|
||||||
|
|
Loading…
Reference in New Issue