Resolve /login route collision by dropping the old Elsa.Studio.Login stack
The classic Elsa.Studio.Login.BlazorWasm.AddLoginModule and the newer
Elsa.Studio.Authentication.ElsaIdentity.UI.AddElsaIdentityUI both register
a '/login' page, which errored out on first render:
The following routes are ambiguous:
'login' in Elsa.Studio.Login.Pages.Login.Login
'login' in Elsa.Studio.Authentication.ElsaIdentity.UI.Pages.Login.Login
Drop the classic module (package + AddLoginModule call + Login.HttpMessageHandlers
namespace) and switch the API auth handler to
ElsaIdentityAuthenticatingApiHttpMessageHandler from the new stack.
This commit is contained in:
@@ -11,7 +11,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Elsa.Studio" Version="3.7.0" />
|
<PackageReference Include="Elsa.Studio" Version="3.7.0" />
|
||||||
<PackageReference Include="Elsa.Studio.Core.BlazorWasm" Version="3.7.0" />
|
<PackageReference Include="Elsa.Studio.Core.BlazorWasm" Version="3.7.0" />
|
||||||
<PackageReference Include="Elsa.Studio.Login.BlazorWasm" Version="3.7.0" />
|
|
||||||
<PackageReference Include="Elsa.Studio.Authentication.ElsaIdentity.BlazorWasm" Version="3.7.0" />
|
<PackageReference Include="Elsa.Studio.Authentication.ElsaIdentity.BlazorWasm" Version="3.7.0" />
|
||||||
<PackageReference Include="Elsa.Studio.Authentication.ElsaIdentity.UI" Version="3.7.0" />
|
<PackageReference Include="Elsa.Studio.Authentication.ElsaIdentity.UI" Version="3.7.0" />
|
||||||
<PackageReference Include="Elsa.Studio.Workflows" Version="3.7.0" />
|
<PackageReference Include="Elsa.Studio.Workflows" Version="3.7.0" />
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using Elsa.Studio.Authentication.ElsaIdentity.BlazorWasm.Extensions;
|
||||||
|
using Elsa.Studio.Authentication.ElsaIdentity.HttpMessageHandlers;
|
||||||
|
using Elsa.Studio.Authentication.ElsaIdentity.UI.Extensions;
|
||||||
using Elsa.Studio.Contracts;
|
using Elsa.Studio.Contracts;
|
||||||
using Elsa.Studio.Core.BlazorWasm.Extensions;
|
using Elsa.Studio.Core.BlazorWasm.Extensions;
|
||||||
using Elsa.Studio.Dashboard.Extensions;
|
using Elsa.Studio.Dashboard.Extensions;
|
||||||
using Elsa.Studio.Extensions;
|
using Elsa.Studio.Extensions;
|
||||||
using Elsa.Studio.Authentication.ElsaIdentity.BlazorWasm.Extensions;
|
|
||||||
using Elsa.Studio.Authentication.ElsaIdentity.UI.Extensions;
|
|
||||||
using Elsa.Studio.Login.BlazorWasm.Extensions;
|
|
||||||
using Elsa.Studio.Login.HttpMessageHandlers;
|
|
||||||
using Elsa.Studio.Models;
|
using Elsa.Studio.Models;
|
||||||
using Elsa.Studio.Options;
|
using Elsa.Studio.Options;
|
||||||
using Elsa.Studio.Shell;
|
using Elsa.Studio.Shell;
|
||||||
@@ -27,13 +26,12 @@ builder.RootComponents.RegisterCustomElsaStudioElements();
|
|||||||
var backendApiConfig = new BackendApiConfig
|
var backendApiConfig = new BackendApiConfig
|
||||||
{
|
{
|
||||||
ConfigureBackendOptions = options => builder.Configuration.GetSection("Backend").Bind(options),
|
ConfigureBackendOptions = options => builder.Configuration.GetSection("Backend").Bind(options),
|
||||||
ConfigureHttpClientBuilder = options => options.AuthenticationHandler = typeof(AuthenticatingApiHttpMessageHandler)
|
ConfigureHttpClientBuilder = options => options.AuthenticationHandler = typeof(ElsaIdentityAuthenticatingApiHttpMessageHandler)
|
||||||
};
|
};
|
||||||
|
|
||||||
builder.Services.AddCore();
|
builder.Services.AddCore();
|
||||||
builder.Services.AddShell();
|
builder.Services.AddShell();
|
||||||
builder.Services.AddRemoteBackend(backendApiConfig);
|
builder.Services.AddRemoteBackend(backendApiConfig);
|
||||||
builder.Services.AddLoginModule();
|
|
||||||
builder.Services.AddElsaIdentity();
|
builder.Services.AddElsaIdentity();
|
||||||
builder.Services.AddElsaIdentityUI();
|
builder.Services.AddElsaIdentityUI();
|
||||||
builder.Services.AddDashboardModule();
|
builder.Services.AddDashboardModule();
|
||||||
|
|||||||
Reference in New Issue
Block a user