title: Adding a Identity Authentication in an EXISTING Blazor project and a SEPARATE WebApi project
body: <p>I am a beginner, and I chose to learn Blazor and WebApi by <strong>NOT</strong> using the Blazor WebAssembly App with ASP.NET Core hosted (<em>I know I could have just used the template where there is a Client, Server, and Shared projects, but I feel that I can learn better when I understand how they operate separately</em>). Anyway, instead I did the following:</p>
  <ol>
  <li><p>Created an <strong>empty</strong> Solution</p>
  </li>
  <li><p>Added a <strong>Server.WebApi</strong> project using an <em>ASP.NET Core Web Application (API)</em> - this is where I placed all my <strong>WebApi Controllers</strong></p>
  </li>
  <li><p>Added a <strong>Lib.DataAccess</strong> project using a <em>Class Library (.NET Standard) Targeting Framework 2.1</em> - this is where I placed my <strong>ApplicationDbContext.cs</strong> and <strong>Migrations</strong> Folder</p>
  </li>
  <li><p>Added a <strong>Lib.Entities</strong> project using a <em>Class Library (.NET Standard) Targeting Framework 2.1</em> - this is where I placed my <strong>Models</strong> and <strong>ViewModels</strong></p>
  </li>
  <li><p>Added a <strong>Client.Blazor</strong> project using a <em>Blazor Web Assembly App</em> but not ASP.NET Core hosted, and with <em>No Authentication</em></p>
  </li>
  </ol>
  <p>So far, I was able to make everything work properly.</p>
  <p>But now, I'd like to learn how to <strong>Add Identity Authentication</strong> in my existing solution...but I don't know how or where to begin...because I also don't really understand the concepts behind or how it works..</p>
  <p>Inquiries:</p>
  <ol>
  <li>Can somebody please help add this to my existing project? Do I install packages on Client.Blazor and Server.WebApi? or install in Server.WebApi only?</li>
  <li>Can I use a separate DbContext and separate Database Schema for the Identity Authentication? Or is it proper to use a different DbContext but use the same Database Schema?</li>
  <li>In relation to #2, I do not know how to implement either...</li>
  <li>When I implement Identity Authentication, is there a way for me to select User Roles (<em>such as System Admin, Encoder, Guest, etc...</em>)?</li>
  <li>When a user is logged in (<em>I'm kinda assuming that the user account logged in data is in the Server.WebApi</em>), is it possible for me to retrieve user account data in the Client.Blazor project?</li>
  </ol>
  <p>I apologize for asking too much here, but there's just too much information in the internet and I am kind of getting lost already...Thanks in advance for the help!</p>