I have setup an identity system with Identity server and wanted to share the instance for tokens between 3 applications, so i have setup the process according to this,
services.AddDbContext<DataProtectionDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString(nameof(DataProtectionDbContext))));
var certificateThumb = Configuration["CertificateConfiguration:Validation:CertificateThumbprint"];
services.AddDataProtection()
.PersistKeysToDbContext<DataProtectionDbContext>()
.ProtectKeysWithCertificate(certificateThumb);
though when i add the DataProtection to the application, the anti forgery token cannot be found, iam assuming that the antiforgery tokens isn't automatically created in the data protection context.
Does anyone know why adding this causes the application to crash on the AntiForgerytoken validation?
IdentityServer Question: is the IdentityServerBuilder.AddValidationKey does that certificate concern the token validation