What are the steps to reproduce the problem?
Just reference the package.
https://www.nuget.org/packages/Volo.Abp.MailKit/
[DependsOn(typeof(AbpMailKitModule)]
Have you used MailKit
in zero?
If yes, please use Volo.Abp.MailKit
in abp vnext
Please share your email configuration.
One more question, is there a place to configure disable the email sending ?
It is not yet configurable, we can consider adding a setting to configure it.
It is expected to be resolved in version 2.2. Please stay tuned.
hi
We will fix this problem, you can use the code below to solve it temporarily.
[ExposeServices(typeof(ConsentModel))]
public class MyConsentModel : ConsentModel
{
private readonly IIdentityServerInteractionService _interaction;
public MyConsentModel(
IIdentityServerInteractionService interaction,
IClientStore clientStore,
IResourceStore resourceStore)
: base(interaction, clientStore, resourceStore)
{
_interaction = interaction;
}
protected override async Task<ConsentModel.ProcessConsentResult> ProcessConsentAsync()
{
var result = new ConsentModel.ProcessConsentResult();
ConsentResponse grantedConsent;
if (ConsentInput.UserDecision == "no")
{
grantedConsent = ConsentResponse.Denied;
}
else
{
if (ConsentInput.IdentityScopes.Any() || ConsentInput.ApiScopes.Any())
{
var identityScopes = ConsentInput.IdentityScopes ?? new List<ConsentModel.ScopeViewModel>();
var apiScopes = ConsentInput.ApiScopes ?? new List<ConsentModel.ScopeViewModel>();
grantedConsent = new ConsentResponse
{
RememberConsent = ConsentInput.RememberConsent,
ScopesConsented = identityScopes.Union(apiScopes).Where(s => s.Checked).Select(s => s.Name).ToList()
};
}
else
{
throw new UserFriendlyException("You must pick at least one permission"); //TODO: How to handle this
}
}
if (grantedConsent != null)
{
var request = await _interaction.GetAuthorizationContextAsync(ReturnUrl);
if (request == null)
{
return result;
}
await _interaction.GrantConsentAsync(request, grantedConsent);
result.RedirectUri = ReturnUrl; //TODO: ReturnUrlHash?
}
return result;
}
}
There is a "modules" page in abp suite. You can download from there.
And abp cli get-source
cmmand to get the source code.
Usage:
abp get-source <module-name> [options]
Options:
-o|--output-folder <output-folder> (default: current folder)
-v|--version <version> (default: latest version)
Examples:
abp get-source Volo.Blogging
abp get-source Volo.Blogging -o d:\my-project
See the documentation for more info: https://docs.abp.io/en/abp/latest/CLI
Maybe LocalizationResource can solve your problem.
see https://github.com/abpframework/abp/blob/654eeede81a733382066bfd00ab19b6b65ceec0e/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application/BookManagementAppService.cs#L10
hi rajasekhard2015 Can you share the full steps to reproduce your problem?
hi @talhazengin
Please share some code, what I see from the picture is not particularly clear.
Property injection will work after the constructor is executed.