Fixing authentication issues in publish mode

This commit is contained in:
Zoe Roux 2021-05-13 21:27:12 +02:00
parent 23e44d5efe
commit 8fcbcd125f
3 changed files with 27 additions and 4 deletions

@ -1 +1 @@
Subproject commit a0f8fe4de48a0f0770646d6052a09c551b6442dd
Subproject commit 22a02671918201d6d9d4e80a76f01b59b216a82d

View File

@ -39,12 +39,14 @@
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="3.1.14" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<ProjectReference Include="../Kyoo.Postgresql/Kyoo.Postgresql.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../Kyoo.Postgresql/Kyoo.Postgresql.csproj">
<!-- <ExcludeAssets>all</ExcludeAssets>-->
</ProjectReference>
<ProjectReference Include="../Kyoo.Authentication/Kyoo.Authentication.csproj">
<ExcludeAssets>all</ExcludeAssets>
<!-- <ExcludeAssets>all</ExcludeAssets>-->
</ProjectReference>
</ItemGroup>
@ -104,4 +106,25 @@
<Visible>false</Visible>
</None>
</ItemGroup>
<!--TODO remove this once plugins are reworked. This is useful because the authentication plugin is loaded manually and not by the plugin manager-->
<PropertyGroup>
<LoginRoot>../Kyoo.WebLogin/</LoginRoot>
</PropertyGroup>
<ItemGroup>
<LoginFiles Include="$(LoginRoot)**" Visible="false" />
</ItemGroup>
<Target Name="Publish login files" AfterTargets="ComputeFilesToPublish">
<ItemGroup>
<ResolvedFileToPublish Include="@(LoginFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>login/%(LoginFiles.RecursiveDir)%(LoginFiles.Filename)%(LoginFiles.Extension)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
<Target Name="Prepare static files" AfterTargets="Build" Condition="$(Configuration) == 'Debug'">
<Copy SourceFiles="@(LoginFiles)" DestinationFolder="$(OutputPath)/login/%(RecursiveDir)" />
</Target>
</Project>

View File

@ -17,7 +17,7 @@
"logging": {
"logLevel": {
"default": "Trace",
"default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.EntityFrameworkCore": "None",