4
inaba
6y

TL;DR: FFS Microsoft

So yesterday we were at the point in our project where adding a login system seemed like a good idea. This is an asp.net core mvc project and we use Materialize for our frontend.

So according to _the tutorials_ we could start a new project and add authentication in the prompt by pressing a button. As it created the project I thought it seemed nice and easy enough. After it had created the test solution I build it and, sure enough, in the top right corner there were a register and login <a>.

I checked them out and they were your bog standard form input input submit and all. Now I guessed I could look at how it's all programmed aaaaaaaaand

Nope.

I saw a new folder located at Areas/Identity/Pages which had a _ViewStart.cshtml which contained three lines. There were also a database migration and in Startup.cs there were some database stuff, but other than that? Nothing. So where on earth was the login and register form located? Shit like that is frustrating ya know.

But oh well it seemed to work and I switched to our examn project where I found it was possible to scaffold the login system in a way that seemed nice.

Except, for some reason bootstrap and jquery decided to return to our project. FFS Microsoft!

Comments
  • 2
    This is why I don't like using scaffolding tools. They hide a lot of details and apply a lot of magic behind the scenes.

    I suggest you read docs on how authentication works in ASP. Net then start a blank project and add that to it. You will learn this better and also you have more control over every aspect of your code.
Add Comment