diff --git a/Shogi.Api/Program.cs b/Shogi.Api/Program.cs index f62e651..b9debee 100644 --- a/Shogi.Api/Program.cs +++ b/Shogi.Api/Program.cs @@ -95,7 +95,10 @@ namespace Shogi.Api { await socketService.HandleSocketRequest(context); } - await next(); + else + { + await next(); + } }); } diff --git a/Shogi.UI/Pages/Authentication.razor b/Shogi.UI/Pages/Authentication.razor index 94ca00f..7d5d1a2 100644 --- a/Shogi.UI/Pages/Authentication.razor +++ b/Shogi.UI/Pages/Authentication.razor @@ -2,7 +2,7 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Authentication -@code{ +@code { [Parameter] public string? Action { get; set; } // https://github.com/dotnet/aspnetcore/blob/main/src/Components/WebAssembly/WebAssembly.Authentication/src/Models/RemoteAuthenticationActions.cs // https://github.com/dotnet/aspnetcore/blob/7c810658463f35c39c54d5fb8a8dbbfd463bf747/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs diff --git a/Shogi.UI/Pages/Home/Account/AccountManager.cs b/Shogi.UI/Pages/Home/Account/AccountManager.cs index 25ccfcb..c48cf13 100644 --- a/Shogi.UI/Pages/Home/Account/AccountManager.cs +++ b/Shogi.UI/Pages/Home/Account/AccountManager.cs @@ -123,7 +123,7 @@ public class AccountManager else if (platform == WhichAccountPlatform.Microsoft) { await accountState.SetUser(null); - navigation.NavigateToLogout("authentication/logout"); + navigation.NavigateToLogout("authentication/logout", "https://lucaserver.space/shogi"); } } } diff --git a/Shogi.UI/Program.cs b/Shogi.UI/Program.cs index ff19fe2..23656de 100644 --- a/Shogi.UI/Program.cs +++ b/Shogi.UI/Program.cs @@ -39,12 +39,8 @@ static void ConfigureDependencies(IServiceCollection services, IConfiguration co services.AddMsalAuthentication(options => { configuration.Bind("AzureAd", options.ProviderOptions.Authentication); - //options.ProviderOptions.DefaultAccessTokenScopes.Add("https://graph.microsoft.com/User.Read"); - //options.ProviderOptions.DefaultAccessTokenScopes.Add("openid"); - //options.ProviderOptions.DefaultAccessTokenScopes.Add("offline_access"); - //options.ProviderOptions.DefaultAccessTokenScopes.Add("profile"); - //options.ProviderOptions.LoginMode = "redirect"; - + options.ProviderOptions.LoginMode = "redirect"; + }); services.AddOidcAuthentication(options => {