Skip to content

Commit a804000

Browse files
committed
Fix?
1 parent 9bd1460 commit a804000

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/Components/WebAssembly/WebAssembly.Authentication/src/NavigationManagerExtensions.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,13 @@ public static void NavigateToLogout(this NavigationManager manager, string logou
3232
/// <param name="returnUrl">The url to redirect the user to after logging out.</param>
3333
public static void NavigateToLogout(this NavigationManager manager, string logoutPath, string? returnUrl)
3434
{
35-
InteractiveRequestOptions? request = null;
36-
if (returnUrl != null)
35+
manager.NavigateTo(logoutPath, new NavigationOptions
3736
{
38-
request = new InteractiveRequestOptions
37+
HistoryEntryState = new InteractiveRequestOptions
3938
{
4039
Interaction = InteractionType.SignOut,
41-
ReturnUrl = returnUrl
42-
};
43-
}
44-
45-
manager.NavigateTo(logoutPath, new NavigationOptions
46-
{
47-
HistoryEntryState = request?.ToState()
40+
ReturnUrl = returnUrl!
41+
}.ToState()
4842
});
4943
}
5044

0 commit comments

Comments
 (0)