Hi,
For now, you can try:
public static class MyStringExtensions
{
public static string NormalizeReturnUrl(this string returnUrl, IUrlHelper url, string returnUrlHash)
{
returnUrl = NormalizeReturnUrl(returnUrl, url);
if (!returnUrlHash.IsNullOrWhiteSpace())
{
returnUrl = returnUrl + returnUrlHash;
}
return returnUrl;
}
private static string NormalizeReturnUrl(string returnUrl, IUrlHelper url)
{
if (returnUrl.IsNullOrEmpty())
{
return "~/";
}
if (url.IsLocalUrl(returnUrl) || returnUrl.StartsWith("your application url (eg. http://localhost:4200)"))
{
return returnUrl;
}
return "~/";
}
}
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(RegisterModel))]
public class MyRegisterModel : RegisterModel
{
protected override string GetRedirectUrl(string returnUrl, string returnUrlHash = null)
{
return returnUrl.NormalizeReturnUrl(Url, returnUrlHash);
}
}
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ResetPasswordConfirmationModel))]
public class MyResetPasswordConfirmationModel : ResetPasswordConfirmationModel
{
protected override string GetRedirectUrl(string returnUrl, string returnUrlHash = null)
{
return returnUrl.NormalizeReturnUrl(Url, returnUrlHash);
}
}
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ResetPasswordModel))]
public class MyResetPasswordModel : ResetPasswordModel
{
public MyResetPasswordModel(ITenantResolveResultAccessor tenantResolveResultAccessor) : base(tenantResolveResultAccessor)
{
}
protected override string GetRedirectUrl(string returnUrl, string returnUrlHash = null)
{
return returnUrl.NormalizeReturnUrl(Url, returnUrlHash);
}
public override async Task<IActionResult> OnPostAsync()
{
ValidateModel();
try
{
await AccountAppService.ResetPasswordAsync(
new ResetPasswordDto
{
UserId = UserId,
ResetToken = ResetToken,
Password = Password
}
);
}
catch (AbpIdentityResultException e)
{
if (!string.IsNullOrWhiteSpace(e.Message))
{
Alerts.Warning(e.Message);
return Page();
}
throw;
}
//TODO: Try to automatically login!
return RedirectToPage("./ResetPasswordConfirmation", new
{
returnUrl = GetRedirectUrl(ReturnUrl, ReturnUrlHash)
});
}
}
The problem has been solved. Because you changed the default page size.
Hi,
For blog module problem: https://github.com/abpframework/abp/issues/6473#issuecomment-738703428
We have written documentation for all commercial modules : ), and we will to improve the documentation of open source modules,they are already in the milestone. Thanks.
About payment module document, see: https://docs.abp.io/en/commercial/latest/modules/payment
Hi,
For 3.3.2 project , you can try:
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo {Title = "MyProjectName API", Version = "v1"});
options.DocInclusionPredicate((docName, description) => true);
options.AddSecurityDefinition("Bearer",
new OpenApiSecurityScheme() {
Description = @"JWT Authorization header using the Bearer scheme. \r\n\r\n
Enter 'Bearer' [space] and then your token in the text input below.
\r\n\r\nExample: 'Bearer 12345678'",
Name = "Authorization",
In = ParameterLocation.Header,
Type = SecuritySchemeType.ApiKey,
Scheme = "Bearer"});
options.AddSecurityRequirement(new OpenApiSecurityRequirement()
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id = "Bearer"
},
Scheme = "oauth2",
Name = "Bearer",
In = ParameterLocation.Header,
},
new List<string>()
}
});
});
Use postman to get access_token,copy and put it in the input box.
Hi,
I have some questions
Please send an email to me. shiwei.liang@volosoft.com
Hi,
Can I check it remotely? shiwei.liang@volosoft.com
Sorry,
I need more infomation. Can I check it remotely? shiwei.liang@volosoft.com
Hi,
Can you share your code?