Can you also expose SignInManager<IdentityUser>
as below?
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(AbpSignInManager), typeof(SignInManager<IdentityUser>))]
public class LitmusSiginManager : AbpSignInManager
{
public override Task<SignInResult> PasswordSignInAsync(string userName, string password, bool isPersistent, bool lockoutOnFailure)
{
//your logic
return base.PasswordSignInAsync(userName, password, isPersistent, lockoutOnFailure);
}
public override Task<SignInResult> PasswordSignInAsync(IdentityUser user, string password, bool isPersistent, bool lockoutOnFailure)
{
//your logic
return base.PasswordSignInAsync(user, password, isPersistent, lockoutOnFailure);
}
}
Do you use separated identity server? If you use, you can add the .IdentityServer project's reference to the project (SCV.Litmus.LitmusIdentity)
Don't forget to add DependsOn.
You're welcome.
It seems your ABP Commercial NuGet Source added with wrong url. (it should be nuget.abp.io not nugut.abp.io)
Please run the dotnet nuget remove source "ABP Commercial NuGet Source"
on your terminal and then run the following command
dotnet tool install -g Volo.Abp.Suite --add-source https://nuget.abp.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/v3/index.json --version 4.4.2
.
change the xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx part with your api-key
I run this command but show error
Please if u need Key let me know
In here, there is a nuget source named "nugut.abp.io" (and it is not found i guess). If it's not used can you delete it?
dotnet nuget remove source <source_name>
You can see the source_name by running
dotnet nuget list source
command.
You can inherit from AbpSignInManager
and override the PasswordSignInAsync method.
https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services#overriding-a-service-class
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(AbpSignInManager))]
public class MyCustomSignInManager : AbpSignInManager
{
public async override Task<SignInResult> PasswordSignInAsync(string userName, string password,
bool isPersistent, bool lockoutOnFailure)
{
//your logic
}
}
When you run dotnet nuget list source
command, is nuget.org on top?
https://support.abp.io/QA/Questions/414/ABP-Suite-install-problem#answer-a69dadf8-946b-01e4-d63f-39f78fb3375e
You can examine this document to see how you can create a CustomSigninManager.
And after you've created CustomSigninManager, you can override the SignInAsync method and implement your logic.
Don't forget to register your CustomSigninManager => https://docs.abp.io/en/abp/2.9/How-To/Customize-SignIn-Manager#register-to-dependency-injection
Can you also specify the version (--version 4.4.2
) like below?
dotnet tool install -g Volo.Abp.Suite --add-source https://nuget.abp.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/v3/index.json --version 4.4.2
Can you navigate to https://commercial.abp.io/my-organizations/ and get your Api-key for your organization?
After obtaining your api-key, add nuget source by using the following command.
dotnet nuget add source <your_nuget_source>
Then run the dotnet nuget list source
command again to see the source.