dotnet / dotnet/aspnetcore

Support for unique phone numbers, find user by phone number in Identity

Open
#55,199 3 comments 3 reactions 0 assignees View on GitHub
area-identity enhancement
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I am trying to create users with unique phone numbers.

I know it's already mentioned here in this issue [25368](https://github.com/dotnet/aspnetcore/issues/25368) and many others, but I think it makes sense to have it now.

### Describe the solution you'd like

As suggested in the issue I referenced above, I think there could be a provided flag when creating a user, to enforce this (or not):

`await userManager.CreateAsync(user, request.Password, requireUniquePhoneNumber = true) // default could be false`

or whichever way you guys deem clean.

Then a `FindByPhonenumber` method in the `userManager`.
### Additional context

In some countries, user identity is tied to their phone numbers, so some apps require users to register with them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.