I am trying to start up an ASP.NET website with MongoDB. The starting ASP.NET project implements a user authorization schema with a connection string to a sql database.
I have a website working with Mongo DB to work off of...but that website seems to have implemented the automatically generated user login system, and somehow changed settings so that the user login data is deposited to the Mongo database instead. Rather than trust Microsoft to handle everything, I would like to build a user login system based on my own libraries (with the end goal being to handle as much as possible in F#).
I am trying to figure out how the user authorization code puts the user information into the database. It seems to be a black box. The code,
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Register(RegisterViewModel model)
{
if (ModelState.IsValid)
{
var user = new ApplicationUser { UserName = model.Email, Email = model.Email };
var result = await UserManager.CreateAsync(user, model.Password);
more specifically,
var result = await UserManager.CreateAsync(user,model.Password);
yields a function specified in metadata upon inspection.
Am I just supposed to copy the settings from the working website I have until it automagically works, or is there a way to manually reproduce the user login system? Is it impossible to reverse engineer the process from the generated code? Is there a tutorial or guide to best practices for creating a secure user login system from scratch?