Skip to content

Commit

Permalink
FW lite: change default authority to be lexbox develop, add task for …
Browse files Browse the repository at this point in the history
…running with the authority locally
  • Loading branch information
hahn-kev committed Jun 7, 2024
1 parent 46a327a commit 878cf35
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/LocalWebApp/LocalAppKernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static void AddAuthHelpers(this IServiceCollection services, IHostEnviro
services.AddTransient<AuthHelpers>(sp => sp.GetRequiredService<AuthHelpersFactory>().GetCurrentHelper());
services.AddSingleton<OAuthService>();
services.AddSingleton<IHostedService>(sp => sp.GetRequiredService<OAuthService>());
services.AddOptionsWithValidateOnStart<AuthConfig>().ValidateDataAnnotations();
services.AddOptionsWithValidateOnStart<AuthConfig>().BindConfiguration("Auth").ValidateDataAnnotations();
services.AddSingleton<LoggerAdapter>();
var httpClientBuilder = services.AddHttpClient(AuthHelpers.AuthHttpClientName);
if (environment.IsDevelopment())
Expand Down
2 changes: 1 addition & 1 deletion backend/LocalWebApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
var builder = WebApplication.CreateBuilder(args);
if (!builder.Environment.IsDevelopment())
builder.WebHost.UseUrls("http://127.0.0.1:0");
builder.ConfigureDev<AuthConfig>(config => config.DefaultAuthority = new("https://localhost:3000"));
builder.ConfigureDev<AuthConfig>(config => config.DefaultAuthority = new("https://lexbox.dev.languagetechnology.org"));
builder.ConfigureProd<AuthConfig>(config => config.DefaultAuthority = new("https://lexbox.org"));
builder.Services.Configure<AuthConfig>(c => c.ClientId = "becf2856-0690-434b-b192-a4032b72067f");

Expand Down
6 changes: 6 additions & 0 deletions backend/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ tasks:
label: dotnet
dir: ./LocalWebApp
cmd: dotnet watch --no-hot-reload
local-web-app-with-local-lexbox:
label: Run LocalWebApp with Local LexBox
env:
Auth__DefaultAuthority: "https://localhost:3000"
dir: ./LocalWebApp
cmd: dotnet watch --no-hot-reload

publish-local-all:
cmds:
Expand Down

0 comments on commit 878cf35

Please sign in to comment.