From fefa0e2dea38ff720adb25260493e6cb470fda65 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Fri, 13 Nov 2020 10:07:49 -0500 Subject: [PATCH] Dont run custom token logic for org based client_ids explicitly (#992) * Dont run custom token logic for org based client_ids explicitly * org to organization --- src/Core/IdentityServer/CustomTokenRequestValidator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Core/IdentityServer/CustomTokenRequestValidator.cs b/src/Core/IdentityServer/CustomTokenRequestValidator.cs index 375c6c6d1a..1e076af5a2 100644 --- a/src/Core/IdentityServer/CustomTokenRequestValidator.cs +++ b/src/Core/IdentityServer/CustomTokenRequestValidator.cs @@ -44,7 +44,8 @@ namespace Bit.Core.IdentityServer public async Task ValidateAsync(CustomTokenRequestValidationContext context) { string[] allowedGrantTypes = { "authorization_code", "client_credentials" }; - if (!allowedGrantTypes.Contains(context.Result.ValidatedRequest.GrantType)) + if (!allowedGrantTypes.Contains(context.Result.ValidatedRequest.GrantType) || + context.Result.ValidatedRequest.ClientId.StartsWith("organization")) { return; }