Skip to content

Commit 87a21fe

Browse files
authored
Fix intermittent redirects during external auto-login (#17220)
1 parent aa631d0 commit 87a21fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/OrchardCore.Modules/OrchardCore.Users/Services/ExternalLoginFormEvents.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ public ExternalLoginFormEvents(
3535
_httpContextAccessor = httpContextAccessor;
3636
}
3737

38+
public override Task LoggedInAsync(IUser user)
39+
{
40+
var tempData = _tempDataDictionaryFactory.GetTempData(_httpContextAccessor.HttpContext);
41+
tempData.Remove(ExternalLoginAutoRedirectKeyName);
42+
43+
return Task.CompletedTask;
44+
}
45+
3846
public override async Task<IActionResult> LoggingInAsync()
3947
{
4048
if (!_externalLoginOptions.UseExternalProviderIfOnlyOneDefined)

0 commit comments

Comments
 (0)