Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Server client config section was not found #2001

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public IdentityServerConfig(IConfiguration configuration)
{
var serverClientSection = identityServerSection
.GetSection("ServerClient");
if (serverClientSection.Value != null)
if (serverClientSection.Exists())
{
return new ServerClient
{
Expand Down
3 changes: 1 addition & 2 deletions backend/Origam.Server/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ internal static IdentityResource[] GetIdentityResources()
{
ClientId = "serverClient",
ClientSecrets = new[] {new Secret(identityServerConfig.ServerClient.ClientSecret.Sha256())},
AllowedGrantTypes = GrantTypes
.ResourceOwnerPasswordAndClientCredentials,
AllowedGrantTypes = GrantTypes.ResourceOwnerPassword,
AllowedScopes = new List<string> {IdentityServerConstants.LocalApi.ScopeName},
};
clients.Add(serverClient);
Expand Down