Is IdentityUser.PhoneNumber ignored in the Identity library?

David Thielen 2,421 Reputation points
2023-11-01T14:58:42.6033333+00:00

Hi all;

The ASP.NET Identity library appears to have dropped all use of IdentityUser.PhoneNumber. Is it still used somewhere? Or does it remain solely so it doesn't break any existing apps that use the IdentityUser object?

thanks - dave

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,281 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,448 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ruikai Feng - MSFT 2,531 Reputation points Microsoft Vendor
    2023-11-02T01:55:56.07+00:00

    Hi,@David Thielen,It's still in use, In some scenarios,a confirmed phonenumber is required for users to login

    For this requirement,we could configure Identity as below:

    builder.Services.AddDefaultIdentity<AppUser>
        (
        options => 
        {
            options.SignIn.RequireConfirmedPhoneNumber = true;
           ........
        }
    )
    
    
    

0 additional answers

Sort by: Most helpful