Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Identity/Core/src/IdentityServiceCollectionExtensions.cs')
-rw-r--r--src/Identity/Core/src/IdentityServiceCollectionExtensions.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs b/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs
index 5cf717b3c3..ee8c3d9569 100644
--- a/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs
+++ b/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs
@@ -72,6 +72,10 @@ public static class IdentityServiceCollectionExtensions
.AddCookie(IdentityConstants.TwoFactorUserIdScheme, o =>
{
o.Cookie.Name = IdentityConstants.TwoFactorUserIdScheme;
+ o.Events = new CookieAuthenticationEvents
+ {
+ OnRedirectToReturnUrl = _ => Task.CompletedTask
+ };
o.ExpireTimeSpan = TimeSpan.FromMinutes(5);
});