title: Why do the ASP.NET Identity interfaces use strings for primary and foreign keys?
body: <p>I'm looking at the interfaces on the new ASP.NET Identity classes and the database it creates using Entity Framework Code First. I'm using the Visual Studio 2013 RC.</p>
  
  <p>At first glance the database schema looks reasonably normal:</p>
  
  <p><img src="https://i.stack.imgur.com/ViiYI.png" alt="enter image description here"></p>
  
  <p><strong>But all the keys are NVARCHAR(128)</strong></p>
  
  <p>And for some crazy reason <code>AspNetUserSecrets.Id</code> is a PK that looks like it could point to more than one record in the <code>AspNetUsers</code> table. Does this mean multiple <code>AspNetUsers</code> will have to share the same password?</p>
  
  <p>When I look at the Looking at the interfaces you're forced to implement, these are all strings...</p>
  
  <pre><code>public class User : IUser
  {
      public string Id { get; set; }
      public string UserName { get; set; }
  }
  
  public class UserSecret : IUserSecret
  {
      public string UserName { get; set; }
      public string Secret { get; set; }
  }
  
  public class UserRole : IUserRole
  {
      public string UserId { get; set; }
      public string RoleId { get; set; }
  }
  
  public class UserClaim : IUserClaim
  {
      public string UserId { get; set; }
      public string ClaimType { get; set; }
      public string ClaimValue { get; set; }
  }
  
  public class UserManagement : IUserManagement
  {
      public string UserId { get; set; }
      public bool DisableSignIn { get; set; }
      public DateTime LastSignInTimeUtc { get; set; }
  }
  
  public class Tokens : IToken
  {
      public string Id { get; set; }
      public string Value { get; set; }
      public DateTime ValidUntilUtc { get; set; }
  }
  
  public class UserLogin : IUserLogin
  {
      public string UserId { get; set; }
      public string LoginProvider { get; set; }
      public string ProviderKey { get; set; }
  }
  
  public class Role : IRole
  {
      public string Id { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>So I'm coming to terms with the fact that I may have to implement this using strings for PK and FK relationships.</p>
  
  <p><strong>But I'd really love to know WHY it's built like this...?</strong></p>
  
  <p><strong>EDIT: Time has passed and there are now articles on how to extend the asp.net identity to use int (or guid) fields:</strong></p>
  
  <p><a href="http://www.asp.net/identity/overview/extensibility/change-primary-key-for-users-in-aspnet-identity" rel="noreferrer">http://www.asp.net/identity/overview/extensibility/change-primary-key-for-users-in-aspnet-identity</a></p>