Skip to content

Commit

Permalink
add KeeTrayTOTP support (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
smorks committed Feb 22, 2020
1 parent 342cca9 commit 93fa9a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion KeePassNatMsg/Entry/EntrySearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,9 @@ private static IEnumerable<KeyValuePair<string, string>> GetFields(ConfigOpt con

// KeeOtp support through keepassxc-browser
// KeeOtp stores the TOTP config in a string field "otp" and provides a placeholder "{TOTP}"
// KeeTrayTOTP uses by default a "TOTP Seed" string field, and the {TOTP} placeholder.
// keepassxc-browser needs the value in a string field named "KPH: {TOTP}"
if (sf.Key == "otp")
if (sf.Key == "otp" || sf.Key.Equals("TOTP Seed", StringComparison.InvariantCultureIgnoreCase))
{
fields.Add(new KeyValuePair<string, string>("KPH: {TOTP}", SprEngine.Compile("{TOTP}", ctx)));
}
Expand Down

0 comments on commit 93fa9a1

Please sign in to comment.