PERFECT!
Not only is this exactly what I needed to achieve, your explanation and code samples are some of the best explanations I've seen so far. Nothing assumed, nothing left out.
Might be worth adding this sample to your official documentation?
Thanks!
T
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 ... :-)
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?
Indeed, that could be the core of the solution! I will try it in the next day or so, and see if it meets the requirements.
I'm not sure how/where I could create new user Claims in this scenario, though.
Is that something that would happen in GetUserInfoAsync?
Ah, excellent. I was wondering if there was a way to do this.
I ended up running "netstat -aon" to get a list of everything using ports on my machine.
I found an entry that was using Port 3000, and made a note of it's PID.
Using Task Manager, I added the PID column, and found and instance of "Node.js" (server-side Node) using the port in question.
Turns out this was running in the background as part of an application called "Logi Analytics".
I terminated the services related to that application, and was able to get ABP Suite up and running without the Kestrel error.
I'll leave this note here, in case it helps someone else out in the future.
Thanks so much for your help! Although now it looks like I'm going to have a busy weekend :-)
T
Beautiful. CLI appears to be working now:
C:\LeptonTheme>abp get-source Volo.LeptonTheme [16:51:12 INF] ABP CLI (https://abp.io) [16:51:13 INF] Version 4.4.3 (Stable) [16:51:16 INF] Output folder: C:\LeptonTheme [16:51:16 INF] Downloading source code of Volo.LeptonTheme [16:51:16 INF] Version: [16:51:16 INF] Output folder: C:\LeptonTheme [16:51:19 INF] Using cached module: Volo.LeptonTheme, version: 4.4.3 [16:51:22 INF] Check out the documents at https://docs.abp.io/en/commercial/latest/themes/lepton [16:51:28 INF] 'Volo.LeptonTheme' has been successfully downloaded to 'C:\LeptonTheme'
C:\LeptonTheme>
Still no luck kicking up ABP Suite though:
C:\LeptonTheme>abp suite [16:51:56 INF] ABP CLI (https://abp.io) [16:51:56 INF] Version 4.4.3 (Stable) Starting Suite v4.4.3 ... [16:52:03 FTL] Unable to start Kestrel. System.IO.IOException: Failed to bind to address http://localhost:3000. ---> System.AggregateException: One or more errors occurred. (An attempt was made to access a socket in a way forbidden by its access permissions.) (An attempt was made to access a socket in a way forbidden by its access permissions.) ---> System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP)
That looks to be something my end (I'm guessing) with the "Unable to start Kestrel". Any ideas on what could be causing that?
I would prefer to use the Suite rather than the CLI moving forward, if possible, so getting this working would be advantageous...
Thanks!
T