diff --git a/bitwarden_license/src/Sso/Utilities/ServiceCollectionExtensions.cs b/bitwarden_license/src/Sso/Utilities/ServiceCollectionExtensions.cs index 008be4feae..89a545c532 100644 --- a/bitwarden_license/src/Sso/Utilities/ServiceCollectionExtensions.cs +++ b/bitwarden_license/src/Sso/Utilities/ServiceCollectionExtensions.cs @@ -62,6 +62,7 @@ namespace Bit.Sso.Utilities options.UserInteraction.ErrorUrl = "/Error"; options.UserInteraction.ErrorIdParameter = "errorId"; } + options.InputLengthRestrictions.UserName = 256; }) .AddInMemoryCaching() .AddInMemoryClients(new List diff --git a/src/Identity/Utilities/ServiceCollectionExtensions.cs b/src/Identity/Utilities/ServiceCollectionExtensions.cs index 3600dba162..0746bd6998 100644 --- a/src/Identity/Utilities/ServiceCollectionExtensions.cs +++ b/src/Identity/Utilities/ServiceCollectionExtensions.cs @@ -36,6 +36,7 @@ namespace Bit.Identity.Utilities { options.Authentication.CookieSameSiteMode = Microsoft.AspNetCore.Http.SameSiteMode.Unspecified; } + options.InputLengthRestrictions.UserName = 256; }) .AddInMemoryCaching() .AddInMemoryApiResources(ApiResources.GetApiResources())