namespace DorkNet.Server.Data.Entities; /// /// An identity from the external sign-in provider (OpenID Connect) linked to a /// DorkNet account. One row per (Issuer, Subject): the provider's stable user /// id, never the email, which can change or be reused. A player proves they own /// the account once, with its password, when the link is made /// (ExternalSignInController.Link); after that the provider alone signs /// them in to the site and, for admins, the admin panel. /// public class ExternalLoginEntity { public long Id { get; set; } public long PlayerId { get; set; } /// The provider's issuer URL (the iss claim). public string Issuer { get; set; } = string.Empty; /// The provider's user id (the sub claim). public string Subject { get; set; } = string.Empty; /// The email the provider reported when the link was made or last /// used. Shown to the player; never used to find the account. public string Email { get; set; } = string.Empty; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public DateTime LastUsedAt { get; set; } = DateTime.UtcNow; }