diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Services/ExternalLoginFormEvents.cs b/src/OrchardCore.Modules/OrchardCore.Users/Services/ExternalLoginFormEvents.cs index 7b0ed6f0ffa..23c03f4927d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Services/ExternalLoginFormEvents.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Services/ExternalLoginFormEvents.cs @@ -35,6 +35,14 @@ public ExternalLoginFormEvents( _httpContextAccessor = httpContextAccessor; } + public override Task LoggedInAsync(IUser user) + { + var tempData = _tempDataDictionaryFactory.GetTempData(_httpContextAccessor.HttpContext); + tempData.Remove(ExternalLoginAutoRedirectKeyName); + + return Task.CompletedTask; + } + public override async Task LoggingInAsync() { if (!_externalLoginOptions.UseExternalProviderIfOnlyOneDefined)