Skip to content

Commit 5542a4d

Browse files
Copilotjaviercn
andcommitted
Fix logout validation logic to handle null HistoryEntryState properly
Co-authored-by: javiercn <[email protected]>
1 parent ae83527 commit 5542a4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ private async Task ProcessLogInCallback()
278278

279279
private async Task ProcessLogOut(string returnUrl)
280280
{
281-
if (Navigation.HistoryEntryState != null && !ValidateSignOutRequestState())
281+
if (Navigation.HistoryEntryState == null || !ValidateSignOutRequestState())
282282
{
283283
Log.LogoutOperationInitiatedExternally(Logger);
284284
Navigation.NavigateTo(ApplicationPaths.LogOutFailedPath, AuthenticationNavigationOptions with { HistoryEntryState = "The logout was not initiated from within the page." });

0 commit comments

Comments
 (0)