Summary
The L1 migration script (�wfc-migrate.ps1) currently generates stub Identity shims (IdentityShims.cs) that provide no-op implementations of ApplicationUserManager and ApplicationSignInManager. These stubs allow migrated code-behinds to compile but do not perform any real authentication or user management.
We should replace these stubs with delegation wrappers that forward calls to the modern ASP.NET Core Identity equivalents:
| Web Forms (Identity v2) |
ASP.NET Core Identity |
| ApplicationUserManager |
UserManager |
| ApplicationSignInManager |
SignInManager |
| IdentityResult |
Microsoft.AspNetCore.Identity.IdentityResult |
| IdentityUser |
Microsoft.AspNetCore.Identity.IdentityUser |
| SignInStatus enum |
Microsoft.AspNetCore.Identity.SignInResult |
Goals
-
ApplicationUserManager wrapper Inject UserManager and delegate:
FindByIdAsync UserManager.FindByIdAsync
CreateAsync UserManager.CreateAsync
ChangePasswordAsync UserManager.ChangePasswordAsync
GeneratePasswordResetTokenAsync / ResetPasswordAsync
GenerateEmailConfirmationTokenAsync / ConfirmEmailAsync
- Phone number, two-factor, and login management methods
-
ApplicationSignInManager wrapper Inject SignInManager<IdentityUser> and delegate:
PasswordSignInAsync SignInManager.PasswordSignInAsync (map SignInStatus SignInResult)
TwoFactorSignInAsync SignInManager.TwoFactorSignInAsync
SignInAsync SignInManager.SignInAsync
-
Registration Provide a services.AddWebFormsIdentityShims<TUser>() extension method that:
- Registers ASP.NET Core Identity (
AddIdentity<TUser, IdentityRole>)
- Registers the delegation wrappers as scoped services
- Configures EF Core Identity stores
-
SignInStatus SignInResult mapping The delegation layer maps the Web Forms SignInStatus enum values to the ASP.NET Core SignInResult properties (Succeeded, IsLockedOut, RequiresTwoFactor, etc.)
Context
- The L1 script generates
IdentityShims.cs with no-op stubs so code compiles
- The L2 Identity migration skill (
bwfc-identity-migration) currently rewrites Account pages from scratch
- This feature would provide a middle ground: code-behinds compile AND auth actually works, before full L2 rewrite
- Affects all projects that have Identity/Account pages (detected by presence of
Account/*.aspx in source)
Acceptance Criteria
Summary
The L1 migration script (�wfc-migrate.ps1) currently generates stub Identity shims (IdentityShims.cs) that provide no-op implementations of ApplicationUserManager and ApplicationSignInManager. These stubs allow migrated code-behinds to compile but do not perform any real authentication or user management.
We should replace these stubs with delegation wrappers that forward calls to the modern ASP.NET Core Identity equivalents:
Goals
ApplicationUserManager wrapper Inject UserManager and delegate:
FindByIdAsyncUserManager.FindByIdAsyncCreateAsyncUserManager.CreateAsyncChangePasswordAsyncUserManager.ChangePasswordAsyncGeneratePasswordResetTokenAsync/ResetPasswordAsyncGenerateEmailConfirmationTokenAsync/ConfirmEmailAsyncApplicationSignInManager wrapper Inject
SignInManager<IdentityUser>and delegate:PasswordSignInAsyncSignInManager.PasswordSignInAsync(mapSignInStatusSignInResult)TwoFactorSignInAsyncSignInManager.TwoFactorSignInAsyncSignInAsyncSignInManager.SignInAsyncRegistration Provide a
services.AddWebFormsIdentityShims<TUser>()extension method that:AddIdentity<TUser, IdentityRole>)SignInStatus SignInResult mapping The delegation layer maps the Web Forms
SignInStatusenum values to the ASP.NET CoreSignInResultproperties (Succeeded,IsLockedOut,RequiresTwoFactor, etc.)Context
IdentityShims.cswith no-op stubs so code compilesbwfc-identity-migration) currently rewrites Account pages from scratchAccount/*.aspxin source)Acceptance Criteria
ApplicationUserManagerdelegates all methods toUserManager<TUser>ApplicationSignInManagerdelegates all methods toSignInManager<TUser>SignInStatusvalues correctly map toSignInResultservices.AddWebFormsIdentityShims<TUser>()extension registers everything