mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Authentication: Using absolute paths for redirect uris
This commit is contained in:
parent
d6c720319e
commit
0187569748
@ -110,6 +110,14 @@ namespace Kyoo.Authentication
|
|||||||
CertificateOption certificateOptions = new();
|
CertificateOption certificateOptions = new();
|
||||||
_configuration.GetSection(CertificateOption.Path).Bind(certificateOptions);
|
_configuration.GetSection(CertificateOption.Path).Bind(certificateOptions);
|
||||||
|
|
||||||
|
clients.AddRange(IdentityContext.GetClients());
|
||||||
|
foreach (Client client in clients)
|
||||||
|
{
|
||||||
|
client.RedirectUris = client.RedirectUris
|
||||||
|
.Select(x => x.StartsWith("/") ? publicUrl + x : x)
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
services.AddIdentityServer(options =>
|
services.AddIdentityServer(options =>
|
||||||
{
|
{
|
||||||
options.IssuerUri = publicUrl;
|
options.IssuerUri = publicUrl;
|
||||||
@ -120,7 +128,7 @@ namespace Kyoo.Authentication
|
|||||||
.AddInMemoryIdentityResources(IdentityContext.GetIdentityResources())
|
.AddInMemoryIdentityResources(IdentityContext.GetIdentityResources())
|
||||||
.AddInMemoryApiScopes(IdentityContext.GetScopes())
|
.AddInMemoryApiScopes(IdentityContext.GetScopes())
|
||||||
.AddInMemoryApiResources(IdentityContext.GetApis())
|
.AddInMemoryApiResources(IdentityContext.GetApis())
|
||||||
.AddInMemoryClients(IdentityContext.GetClients().Concat(clients))
|
.AddInMemoryClients(clients)
|
||||||
.AddProfileService<AccountApi>()
|
.AddProfileService<AccountApi>()
|
||||||
.AddSigninKeys(certificateOptions);
|
.AddSigninKeys(certificateOptions);
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="$(LoginRoot)**;" />
|
<None Remove="$(LoginRoot)**;" />
|
||||||
<Content Include="$(LoginRoot)**">
|
<Content Include="$(LoginRoot)**" Visible="false">
|
||||||
<Link>login/%(RecursiveDir)%(Filename)%(Extension)</Link>
|
<Link>login/%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit dca10903ff54a8999732695b5c2a0a5c94f85200
|
Subproject commit e2941691f3f57523f2094a036bf10017195f1b58
|
Loading…
x
Reference in New Issue
Block a user