user is not able to login if tenant has enabled email confirmation after user sign-up. As tenant has enabled setting later but user has already signed-up. how we can enable email confirmation process for all existing users?
Question: how to version API. i have done below changes but i am not getting swagger working:
1- Controller changes [RemoteService] [Area("app")] [ApiVersion("2")] [ControllerName("BPMMapping")] [ApiExplorerSettings(IgnoreApi = false)] [Route("api/v{version:apiVersion}/app/bpmmappings")] public class BPMMappingV2Controller : AbpController, IBPMMappingAppService { }
2- Host Module Changes
private static void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration) { context.Services.AddApiVersioning(config => { config.DefaultApiVersion = new ApiVersion(1, 0); config.ReportApiVersions = true; config.AssumeDefaultVersionWhenUnspecified = true; });
context.Services.AddControllers().AddNewtonsoftJson(options =>
{
options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
options.SerializerSettings.TypeNameHandling = TypeNameHandling.Auto;
});
context.Services.AddMvc(options => {
foreach (var outputFormatter in
options.OutputFormatters.OfType<ODataOutputFormatter>().Where(_ => .SupportedMediaTypes.Count == 0)) { outputFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/prs.odatatestxx-odata")); } foreach (var inputFormatter in options.InputFormatters.OfType<ODataInputFormatter>().Where( => _.SupportedMediaTypes.Count == 0)) { inputFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/prs.odatatestxx-odata")); } }).SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
context.Services.AddAbpSwaggerGenWithOAuth(
configuration["AuthServer:Authority"],
new Dictionary<string, string>
{
{"EzpandCC", "EzpandCC API"}
},
options =>
{
options.CustomSchemaIds(x => x.FullName);
options.SwaggerDoc("v1", new Microsoft.OpenApi.Models.OpenApiInfo() { Title = "EzpandCC API V1", Version = "v1", Description = "API V1", });
options.SwaggerDoc("v2", new Microsoft.OpenApi.Models.OpenApiInfo() { Title = "EzpandCC API V2", Version = "v2", Description = "API V2", });
options.DocInclusionPredicate((version, desc) =>
{
if (!desc.TryGetMethodInfo(out MethodInfo methodInfo)) return false;
var versions = methodInfo.DeclaringType.GetCustomAttributes(true).OfType<ApiVersionAttribute>().SelectMany(attr => attr.Versions);
var maps = methodInfo.GetCustomAttributes(true).OfType<MapToApiVersionAttribute>().SelectMany(attr => attr.Versions).ToArray();
version = version.Replace("v", "");
return versions.Any(v => v.ToString() == version && maps.Any(v => v.ToString() == version));
});
});
context.Services.RegisterServiceIoc();
}
3- Host Module --> OnApplicationInitialization() changes //----------new start ------------ app.UseSwagger(options => options.RouteTemplate = "swagger/{documentName}/swagger.json"); app.UseSwaggerUI(options => {
options.DocumentTitle = "Aztute API";
options.SwaggerEndpoint($"/swagger/v1/swagger.json", $"v1");
options.SwaggerEndpoint($"/swagger/v2/swagger.json", $"v2");
IConfiguration configuration = context.GetConfiguration();
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
});
app.UseEndpoints(endpoints => endpoints.MapControllers());
//----------new end ------------
//--------- default abp start -----------
//app.UseSwagger();
//app.UseSwaggerUI(options =>
//{
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "EzpandCC API");
// IConfiguration configuration = context.GetConfiguration();
// options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
// options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
//});
4- Swagger response
Hi Team, How i can use "Azure redis cache" in place of local redis server.
Hi Team, WHat is the API/ Reporsitory i have to use to update user information like name, surname, email and phone no. I have tried with IIdentityUserRepository.Update() and IdentityUserAppService.Update() method but i am getting error. Considering i am doing this using Host --> Admin role user.
how i can create organization unit in api. i have tried with IOrganizationRepo.InsertAsync() but it is breaking as code is manadatory and there is no way i can set Code.
Hi Team, We have our custom mobile app. In mobile app we have integrated google and other provider for user sign-up. We would like to store mobile user sign-up information with web application so that same user can login seamlessly in mobile and web application. Please share the ABP api to use or code reference.
hi Team, Please confirm if identity server supports apple as external auth provider. If yes, how i can enable it. Please share nuget package reference to add (if any) and code changes to be done.
Please let me know how to get this fixed