diff --git a/samples/OpenIdConnectSample/Program.cs b/samples/OpenIdConnectSample/Program.cs
index b370c85a9e..49cbf139d6 100644
--- a/samples/OpenIdConnectSample/Program.cs
+++ b/samples/OpenIdConnectSample/Program.cs
@@ -13,7 +13,7 @@ namespace OpenIdConnectSample
var host = new WebHostBuilder()
.UseKestrel(options =>
{
- //Configure SSL
+ // Configure SSL
var serverCertificate = LoadCertificate();
options.UseHttps(serverCertificate);
})
diff --git a/samples/OpenIdConnectSample/Startup.cs b/samples/OpenIdConnectSample/Startup.cs
index 32d4739d19..37b753102b 100644
--- a/samples/OpenIdConnectSample/Startup.cs
+++ b/samples/OpenIdConnectSample/Startup.cs
@@ -1,5 +1,8 @@
using System;
+using System.Collections.Generic;
using System.Linq;
+using System.Text.Encodings.Web;
+using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Builder;
@@ -80,20 +83,22 @@ namespace OpenIdConnectSample
{
if (context.Request.Path.Equals("/signedout"))
{
- context.Response.ContentType = "text/html";
- await context.Response.WriteAsync($"
You have been signed out. {Environment.NewLine}");
- await context.Response.WriteAsync("Sign In");
- await context.Response.WriteAsync($"");
+ await WriteHtmlAsync(context.Response, async res =>
+ {
+ await res.WriteAsync($"