1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

new "Challenge" token for U2f

This commit is contained in:
Kyle Spearrin
2018-10-10 17:51:38 -04:00
parent 5a75134cf6
commit 006cfffab3
2 changed files with 25 additions and 7 deletions

View File

@ -327,9 +327,12 @@ namespace Bit.Core.IdentityServer
}
else if(type == TwoFactorProviderType.U2f)
{
// TODO: Remove "Challenges" in a future update. Deprecated.
var tokens = token?.Split('|');
return new Dictionary<string, object>
{
["Challenges"] = token
["Challenge"] = tokens.Length > 0 ? tokens[0] : null,
["Challenges"] = tokens.Length > 1 ? tokens[1] : null
};
}
else if(type == TwoFactorProviderType.Email)