1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 21:48:12 -05:00

Prevent error when using WebAuthn as non premium user (#1331)

This commit is contained in:
Oscar Hinton 2021-05-17 09:39:40 +02:00 committed by GitHub
parent 785705342c
commit 4258076bae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -433,6 +433,11 @@ namespace Bit.Core.IdentityServer
}
else if (type == TwoFactorProviderType.WebAuthn)
{
if (token == null)
{
return null;
}
return JsonSerializer.Deserialize<Dictionary<string, object>>(token);
}
else if (type == TwoFactorProviderType.Email)

View File

@ -131,6 +131,7 @@ namespace Bit.Core.Models
case TwoFactorProviderType.Duo:
case TwoFactorProviderType.YubiKey:
case TwoFactorProviderType.U2f:
case TwoFactorProviderType.WebAuthn:
return true;
default:
return false;