-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth Cookie Sharing topic updates #13195
Conversation
Cookie interop samples/tests got dropped from 3.0 branches entirely, so yeah best to just remove them from now. The 2.2 source should still work for the most part |
@HaoK Sounds good ... much better than occasionally battling with the NETFX sample. This can be reviewed anytime ... no rush. It's ready whenever u are. |
The schemas for Core and 4.x should not be too different, but to share a database, the newest version of identity should 'own' the database, and all older versions of EF should add migrations to account for any schema changes. @ajcvickers is that an apt description of what the recommendation approach for having multiple versions of identity target the same shared database? |
@HaoK I'm confused on how migrations would address the scenario for using the common dB. It seems like Data Annotations or Fluent API (with an This isn't a scenario that I've faced professionally, so I'll definitely hold for a sec to hear from you/Arthur on the right way to address it. |
Perhaps migrations aren't the right word to use. Here's a link to the old POCO classes that were needed to adapt the old 4.x identity to work against identity core's schema. Basically the idea was adding properties to the POCO to match the identity core schema, but the older identity frameworks would just ignore these columns https://github.com/aspnet/Identity/tree/master/src/AspNetCoreCompat |
That's what I was thinking (guessing). Something like this ...
|
I was just curious to see the deltas (Core 3.0.0-preview6.19307.2 vs. NETFX 2.2.2) ...
public virtual string SecurityStamp { get; set; }
public virtual bool PhoneNumberConfirmed { get; set; }
public virtual string PhoneNumber { get; set; }
public virtual string PasswordHash { get; set; }
public virtual string NormalizedUserName { get; set; }
public virtual string NormalizedEmail { get; set; }
public virtual DateTimeOffset? LockoutEnd { get; set; }
public virtual bool LockoutEnabled { get; set; }
public virtual TKey Id { get; set; }
public virtual bool EmailConfirmed { get; set; }
public virtual string Email { get; set; }
public virtual string ConcurrencyStamp { get; set; }
public virtual int AccessFailedCount { get; set; }
public virtual bool TwoFactorEnabled { get; set; }
public virtual string UserName { get; set; }
public virtual string Email { get; set; }
public virtual bool EmailConfirmed { get; set; }
public virtual string PasswordHash { get; set; }
public virtual string SecurityStamp { get; set; }
public virtual string PhoneNumber { get; set; }
public virtual bool PhoneNumberConfirmed { get; set; }
public virtual bool TwoFactorEnabled { get; set; }
public virtual DateTime? LockoutEndDateUtc { get; set; }
public virtual bool LockoutEnabled { get; set; }
public virtual int AccessFailedCount { get; set; }
public virtual ICollection<TRole> Roles { get; }
public virtual ICollection<TClaim> Claims { get; }
public virtual ICollection<TLogin> Logins { get; }
public virtual TKey Id { get; set; }
public virtual string UserName { get; set; } I can see why this gets a bit 😵 ... and roles and claims are handled differently, which makes it even more challenging. The doc challenge here is that a few sentences that describe the overall scenario probably won't be all that helpful. Is it a viable remark to say that in many scenarios it's better to upgrade older apps and use the newer Identity everywhere? ... that long-term it's actually easier to do that than to build all of this infrastructure and maintain it. |
Yeah I don't think we've gotten more than one or two requests asking about this either, so I don't think its something many people are trying to do |
@Rick-Anderson Updated and ready to go. |
Addresses #5495
Fixes #12432
Internal Review Topic