+ /// // The DBSC bound session cookie follows .AspNetCore.{sourceScheme}.Dbsc.Session
+ /// const string boundCookie = ".AspNetCore.Identity.Application.Dbsc.Session";
+ ///
+ /// app.Use(async (context, next) =>
+ /// {
+ /// var alreadyBound = context.Request.Cookies.ContainsKey(boundCookie);
+ /// var alreadyOffered = context.Request.Cookies.ContainsKey("dbsc-offered");
+ ///
+ /// if (context.User.Identity?.IsAuthenticated == true && !alreadyBound && !alreadyOffered)
+ /// {
+ /// context.WriteDeviceBoundSessionRegistration(IdentityConstants.ApplicationScheme);
+ ///
+ /// context.Response.Cookies.Append("dbsc-offered", "1", new CookieOptions
+ /// {
+ /// Path = "/",
+ /// Secure = true,
+ /// HttpOnly = true,
+ /// SameSite = SameSiteMode.Lax,
+ /// });
+ /// }
+ ///
+ /// await next();
+ /// });
+ ///
+ ///