title: Should I avoid using the built in ASP.NET identity mechanism?
body: <p>I am trying to create an application that has the ability to create user accounts that have a wide range of permissions. I am currently using the built in ASP.NET Core identity system, but I run into some problems that I haven't find any or haven't find any clean solutions and that will get explained later on the post. This had made me thinking of creating my own custom identity mechanism that will fit my needs.</p>
  
  <p>The problems that I am facing are:</p>
  
  <ul>
  <li><p>I am using MySQL as my db provider and upon creating the db tables I
  was thrown the following exception <strong>"Specified key was too long: max
  key length is 3072 bytes"</strong>. I managed to fix this issue by
  overriding the <strong>OnModelCreating</strong> method and manually changing the
  <strong>HasMaxLength</strong> value using the following code</p>
  
  <p>modelBuilder.Entity&lt;IdentityUserLogin>().Property(ul => ul.LoginProvider).HasMaxLength(36);</p>
  
  <p>It's not beautiful but it gets the job done.</p></li>
  <li>I want my users to be able to add <strong>multiple emails</strong> and <strong>multiple
  phone numbers</strong> to their accounts. The built in ASP.NET Core identity
  creates an email and a phone number column in the users table. I know
  I can prevent it from creating those columns but I really don't
  believe that's the right solution. Basically what I need is to have a
  table related to the users table that will store the users' emails
  and one for the phone numbers following the same pattern.</li>
  <li>My application will have the ability to create <strong>dynamic fields</strong> and
  will also have the ability to give its users <strong>permissions related to
  those fields (ex. CanSee,CanEdit,CanDelete)</strong>. The built in Role
  authorization system doesn't fit my requirements and I have seen a
  lot of buzz surrounding the built in Claims authorization system. I
  have actually read that the implementation of an authorization system
  that is pretty close to what I need is very complicated and very hard
  to maintain!</li>
  </ul>
  
  <p>My question is, should I use the built in ASP.Net core identity system to achieve my goals even though I am facing the such problems? Are there any solutions to my problems that I don't know about and would make my life easier while using the ASP.Net core identity system? Should I create my own identity system and if so, how difficult and potentially dangerous such a system will be?</p>