I've previously used ASP.NET Zero, where I could modify the authentication code so that the username / password combination was passed to my own external service, which would then authenticate the user against a standalone database used for a separate application.
When the response was returned, ASP.NET Zero was automatically creating the user in it's own database as well.
Is there a way to achieve something similar in ABP.io? Basically, I need to take the username / password that the user enters, and pass those, along with a custom key stored against the tenant, to an external service. That service will return a boolean indicating whether the username / password was a valid combination, along with a key/value list that will need to be stored against the ICurrentUser ... I'm guessing as Claims?
Any help / examples would be appreciated!
T
7 Answer(s)
-
0
Okay, partway there with this. I'm just stuck on where to put this code:
Configure<AbpIdentityAspNetCoreOptions>(options => { options.ExternalLoginProviders.Add<FakeExternalLoginProvider>(FakeExternalLoginProvider.Name); });
I'm on current build, Blazor, minimal .NET 6.
I thought it might have to go into the module class, in the "ConfigureExternalProviders" method ... but I can't seem to get the syntax correct.
Can you please assist?
-
0
Great, thanks.
Read a little further down, and someone had corrected the registration code so that it used "AbpIdentityOptions", rather than "AbpIdentityAspNetCoreOptions":
Configure<AbpIdentityOptions>(options => { options.ExternalLoginProviders.Add<FakeExternalLoginProvider>(FakeExternalLoginProvider.Name); });
Actually got it working in the Blazor app ... I'm building for server-side Blazor, not WASM. That said, yes, it probably needs implementing in the API project as well.
That's half the problem solved ... now to tackle the Claims component ... :-)