Allow alternate totp format (#523)

Fixes #495
This commit is contained in:
Miles Breslin 2019-07-04 00:14:47 -07:00 committed by Harsh Shandilya
parent 143a24efc6
commit 2e8fe06b2b

View file

@ -83,6 +83,9 @@ class PasswordEntry(private val content: String) {
if (line.startsWith("otpauth://totp/")) {
return Uri.parse(line).getQueryParameter("secret")
}
if (line.toLowerCase().startsWith("totp:")) {
return line.split(": *".toRegex(), 2).toTypedArray()[1]
}
}
return null
}