1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-23 17:07:42 +01:00

uncomment to require auth-email header (#1604)

This commit is contained in:
Kyle Spearrin 2021-09-30 11:24:29 -04:00 committed by GitHub
parent 2a6132802b
commit f58b9fcab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,13 +50,12 @@ namespace Bit.Core.IdentityServer
public async Task ValidateAsync(ResourceOwnerPasswordValidationContext context)
{
// Uncomment whenever we want to require the `auth-email` header
//if (!AuthEmailHeaderIsValid(context))
//{
// context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant,
// "Auth-Email header invalid.");
// return;
//}
if (!AuthEmailHeaderIsValid(context))
{
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant,
"Auth-Email header invalid.");
return;
}
string bypassToken = null;
if (_captchaValidationService.RequireCaptchaValidation(_currentContext))