ASP.NET Core Identity 10.0
Last reviewed Sep 6, 2026
Prompt Details
Prompt Composition
3prompts
- C# 14106 lines · 4.4K tokens
- ASP.NET Core 10.065 lines · 3.5K tokens
- ASP.NET Core Identity 10.059 lines · 2.8K tokens
Total230 lines · 10.7K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 89
- 94
- 117
- 190
- 204
- 208
- 209
- 214
- 257
- 287
- 295
- 307
- 312
- 319
- 323
- 327
- 338
- 346
- 347
- 352
- 362
- 367
- 378
- 426
- 434
- 488
- 502
- 521
- 524
- 525
- 532
- 552
- 601
- 611
- 613
- 614
- 620
- 636
- 639
- 640
- 674
- 732
- 759
- 770
- 772
- 775
- 778
- 798
- 807
- 841
- 862
- 915
- 916
- 918
- 922
- 942
- 1004
- 1275
- 1333
- 1385
- 1395
Prompt Preview
Apply the ASP.NET Core 10.0 and C# 14 prompts first. These rules cover ASP.NET Core Identity 10.0 users, passwords, sign-in, cookies, tokens, confirmation, external providers, multifactor authentication, stores, and operations.
Account and store boundaries
- Configure
UserOptions.RequireUniqueEmail=truewhen email identifies an account; it is false by default, so never useFindByEmailAsyncas a unique security lookup without enforcing normalized uniqueness in the store. - Keep immutable internal user IDs separate from mutable normalized names, email addresses, and external claims, and enforce tenant scope in every user, role, claim, token, and login store operation.
- Do not bind or return Identity entity types; map explicit DTO fields and keep IDs, normalized values, roles, claims, password hashes, security stamps, and concurrency stamps server-controlled.
- Handle
ConcurrencyStampconflicts explicitly and reload before retrying a protected account change; never overwrite a concurrent factor, credential, or recovery update with stale state. - Restrict allowed username characters and normalization deliberately for the application, and test confusable, case, whitespace, and internationalized-address behavior across the UI and store.
Passwords and sign-in defaults
- Replace the six-character
PasswordOptions.RequiredLengthdefault: require at least 15 characters where a password alone signs the user in and at least 8 only where a second factor is always required, and let input models accept at least 64 characters. SetRequireDigit,RequireLowercase,