C# / Blazor / IdentityController and side effects.
-
So, I have this Blazor app where I used the built-in IdentityController to do logins/registering and stuff. Thing was that I wanted to have an alternate source of truth and the default registration method did not suit me (I also didn't want to do this overcomplicated OpenID thing they push you towards when the provided methods don't suit your needs).
Took me a while but I figured out which class to override. Basically, you have a
SignInManager<IdentityUser>
where I only needed to override theCheckPasswordSignInAsync
method which gets called upon hitting the Login button through a method calledPasswordSignInAsync
residing in theSignInManager
instance.Now, that's only checking the username/password. The whole process also seems to call up the
UserManager<IdentityUser>
at some point as a side effect to get the actual user information after a successful check.Is there some way to see what those top-level functions are actually doing in what order?
I've already tried turning off "Just my code" and also enabled "Step through .NET Framework Source Code" but it's still skipping anything that's not written by me. I.e. I click "step into" and the next line of code I see is something I overrode (i.e. several steps after my debug breakpoint).
-
@Rhywden said in C# / Blazor / IdentityController and side effects.:
I've already tried turning off "Just my code" and also enabled "Step through .NET Framework Source Code" but it's still skipping anything that's not written by me.
IIRC, someone said here some time ago that after changing those settings you need to restart something? (I'm used to working in other environments where you get absolutely everything and have the opposite problem: sorting the wood from the trees.)
-
@Rhywden said in C# / Blazor / IdentityController and side effects.:
Is there some way to see what those top-level functions are actually doing in what order?
Have you tried a profiler?
-
@error Not yet.
I tried to go up one step in the Stack Frame (from my override method to the unchanged calling method) and got this:
-
Something like https://github.com/dotnet/aspnetcore/blob/master/src/Identity/Core/src/SignInManager.cs ?
-
@anonymous234 Yah, thank you. Did not think to look for the freaking source code on Github!