Implementing .net Auth/Identity
I'm having some trouble with implementing .net Identity related features
https://paste.mod.gg/kwlujwqjjojv/2
current error is an exception relating to service not being constructed
it's in the error page on blazebin
If someone can nudge me in the right direction here ?
have a hard time understanding how it fits together in my specific context
BlazeBin - kwlujwqjjojv
A tool for sharing your source code with the world!
8 Replies
These have to be done in that specific order, I think you missed UseAuthentication
Unsure if UseRouting is specific to a certain flavor of asp.net without controllers, there's so many ways to do ASP.net, but I'm guessing UseAuthentication is the missing piece
If it's not that IDK, my auth stuff looks very different but I've been doing it on blazor server
Thanks for the reply
seems i already had useAuthorization();
added the other 2 above the line, but not working yet
Authentication and Authorization are different things, I think you'd need both. Maybe take out UseRouting, I think your MapControllers is the same thing but for MVC
But yeah, if that's not it then, not sure
Ahead of you =D, already commented out useRouting, but same thing
I remember trying to mess with it multiple times and always got so annoyed because there's 10 different instructions for how to do it and none of them matched my 'flavor' of ASP.net
part of why I swapped to blazor lol, at least there's only one set of instructions for blazor (even if that's also still just another asp.net flavor)
Get you, hence my confusion at this, i have no idea what exactly it expects and find lots of conflicting info
is blazor easy to implement then?
I really like it, but you gotta keep in mind security concerns because most of the code ends up going on the client's machine, so things like API keys and whatnot aren't safe in the code
but it's just straightforward C# code, no javascript and almost no HTML, no magic API strings or anything, just methods with strongly typed signatures
er... depending on how you deal with the API parts, cuz there are still API parts, but not with things like [Route("MagicString")] tags that you have to keep up with
as a nice bonus, anything you do in blazor can also be moved straight over to MAUI (or vice versa) as a full fledged client application with pretty much no changes
K, thanks for the info!