From d83bcd42d37e781288cc419ee179f3f45fed5928 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Thu, 12 Dec 2024 09:12:46 -0800 Subject: [PATCH] Fix intermittent redirects during external auto-login (#17227) --- .../OrchardCore.Users/Services/ExternalLoginFormEvents.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Services/ExternalLoginFormEvents.cs b/src/OrchardCore.Modules/OrchardCore.Users/Services/ExternalLoginFormEvents.cs index 98b58eeca09..b21bb5b970d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Services/ExternalLoginFormEvents.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Services/ExternalLoginFormEvents.cs @@ -39,7 +39,12 @@ public Task IsLockedOutAsync(IUser user) => Task.CompletedTask; public Task LoggedInAsync(IUser user) - => Task.CompletedTask; + { + var tempData = _tempDataDictionaryFactory.GetTempData(_httpContextAccessor.HttpContext); + tempData.Remove(ExternalLoginAutoRedirectKeyName); + + return Task.CompletedTask; + } public async Task LoggingInAsync() {