mirror of
https://github.com/bitwarden/server.git
synced 2026-02-11 03:13:16 +08:00
[PM-5518] Refactor Email Token Providers (#3784)
* new email token providers * move email redaction to core helpers * make token options configurable * protected setters on options * fix email token provider tests * fix core tests --------- Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
This commit is contained in:
@@ -511,7 +511,9 @@ public abstract class BaseRequestValidator<T> where T : class
|
||||
}
|
||||
else if (type == TwoFactorProviderType.Email)
|
||||
{
|
||||
return new Dictionary<string, object> { ["Email"] = token };
|
||||
var twoFactorEmail = (string)provider.MetaData["Email"];
|
||||
var redactedEmail = CoreHelpers.RedactEmailAddress(twoFactorEmail);
|
||||
return new Dictionary<string, object> { ["Email"] = redactedEmail };
|
||||
}
|
||||
else if (type == TwoFactorProviderType.YubiKey)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user