diff --git a/Web/Pages/CreateServer.razor b/Web/Pages/CreateServer.razor index 04b2bbe..311f37f 100644 --- a/Web/Pages/CreateServer.razor +++ b/Web/Pages/CreateServer.razor @@ -2,14 +2,7 @@ @using Microsoft.AspNetCore.Http @using Microsoft.AspNetCore.Authentication @inject IHttpContextAccessor _httpContextAccessor - - - - - -

You must be logged in to view this page!

-
-
+@attribute [Authorize] @code { protected async override Task OnInitializedAsync() diff --git a/Web/Shared/NavMenu.razor b/Web/Shared/NavMenu.razor index ef7ec78..7aa0fe9 100644 --- a/Web/Shared/NavMenu.razor +++ b/Web/Shared/NavMenu.razor @@ -12,16 +12,15 @@ Home - - + + + + + diff --git a/Web/appsettings.json b/Web/appsettings.json index a641504..edc9ff4 100644 --- a/Web/appsettings.json +++ b/Web/appsettings.json @@ -8,7 +8,7 @@ }, "AllowedHosts": "*", "oidc" : { - "authority" : "https://dummy.dummy", + "authority" : "oidc_url", "client_id": "id", "client_secret": "secret" } diff --git a/WebAPI/Data/Models/User.cs b/WebAPI/Data/Models/User.cs index 0a81354..1d47063 100644 --- a/WebAPI/Data/Models/User.cs +++ b/WebAPI/Data/Models/User.cs @@ -3,6 +3,6 @@ namespace WebAPI.Data.Models public class User : BaseEntity { public int? PterodactylUserId { get; set; } - public int? ExternalAuthIdentifier { get; set; } + public string ExternalAuthIdentifier { get; set; } } } \ No newline at end of file diff --git a/WebAPI/Data/OIDCService.cs b/WebAPI/Data/OIDCService.cs index 705a9f4..2ed297f 100644 --- a/WebAPI/Data/OIDCService.cs +++ b/WebAPI/Data/OIDCService.cs @@ -32,7 +32,7 @@ namespace WebAPI.Data { return false; } - return false; + return true; } } diff --git a/WebAPI/Program.cs b/WebAPI/Program.cs index 215d4a9..5b930a0 100644 --- a/WebAPI/Program.cs +++ b/WebAPI/Program.cs @@ -18,6 +18,9 @@ namespace WebAPI public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); } } \ No newline at end of file diff --git a/WebAPI/Properties/launchSettings.json b/WebAPI/Properties/launchSettings.json index bc06a8b..9d2ab6a 100644 --- a/WebAPI/Properties/launchSettings.json +++ b/WebAPI/Properties/launchSettings.json @@ -22,7 +22,7 @@ "dotnetRunMessages": "true", "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "https://localhost:5001;http://localhost:5000", + "applicationUrl": "https://localhost:44319;http://localhost:36546", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 40ce389..b7bd84f 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -1,8 +1,9 @@ - + net5.0 - + 70ad8aec-0a1b-4ec9-bd5c-3d11ff1fcd93 + diff --git a/WebAPI/appsettings.json b/WebAPI/appsettings.json index bb7dea6..01fe3bc 100644 --- a/WebAPI/appsettings.json +++ b/WebAPI/appsettings.json @@ -12,5 +12,5 @@ "AllowedHosts": "*", "PterodactylAPIKey": "REPLACE_ME", "PterodactylPanelURL": "https://panel.orfl.xyz", - "OIDCUserInfoEndpoint": "https://authentik.mattstop.com/application/o/userinfo" + "OIDCUserInfoEndpoint": "https://authentik.mattstop.com/application/o/userinfo/" }