0
raif created
- ABP Framework version: v7.3.2
- UI Type: MVC
- Database System: EF Core SQL Server
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
context.Services.AddAuthentication()
//.AddAbpOpenIdConnect("myAuthSchema", "myAuth AD", options =>
.AddOpenIdConnect("myAuthSchema", "myAuth AD", options =>
{
options.Authority = configuration["AzureAd:Authority"].EnsureEndsWith('/') + configuration["AzureAd:TenantId"].EnsureEndsWith('/') + "v2.0".TrimEnd('/');
options.MetadataAddress = configuration["AzureAd:MetadataAddress"].EnsureEndsWith('/') + configuration["AzureAd:TenantId"].EnsureEndsWith('/') + "v2.0".EnsureEndsWith('/') + ".well-known/openid-configuration";
options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
options.ClientId = configuration["AzureAd:ClientId"];
options.ClientSecret = configuration["AzureAd:ClientSecret"];
options.UsePkce = true;
options.GetClaimsFromUserInfoEndpoint = true;
options.TokenValidationParameters = new TokenValidationParameters()
{
ValidateIssuer = true,
};
options.TokenValidationParameters.ValidIssuers = new[]
{
configuration["AzureAd:MetadataAddress"],
configuration["AzureAd:Authority"]
};
options.Scope.Add("openid");
options.Scope.Add("profile");
options.Scope.Add("offline_access");
options.Scope.Add("email");
});
.WithDynamicOptions < OpenIdConnectOptions, OpenIdConnectHandler > (
"myAuthSchema",
options =>
{
options.WithProperty(x => x.ClientId);
options.WithProperty(x => x.ClientSecret, isSecret: true);
}
);
I would like to provide ClientId
and ClientSecret
values via Account External Provider Settings
/api/account/external-provider endpoint keeps returning only Google, Twitter and Microsoft values
I also tried to extend provider list via AbpExternalProviderOptions
but no luck
context.Services.Configure < AbpExternalProviderOptions > (options =>
{
options.Definitions.Add(new ExternalProviderDefinition()
{
Name = "Test",
Properties = new List < ExternalProviderDefinitionProperty >()
});
});
What am i missing ?
2 Answer(s)
-
0
-
0
Doh, thx