dotnet / dotnet/aspnetcore

Default Values for IdentityUser

Open
#5,823 13 comments 10 reactions 0 assignees View on GitHub
affected-most area-identity enhancement severity-nice-to-have triaged
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

I've realized that the configuration for the default entity `IdentityUser`
https://github.com/aspnet/Identity/blob/master/src/EF/IdentityUserContext.cs#L134 doesn't have any configuration for the `PhoneNumber` and other values.

I faced a few performance lacking using varchar(max) sizing.

Reference : https://sqlperformance.com/2017/06/sql-plan/performance-myths-oversizing-strings

I think it'd be a good idea use some standard as default to avoid users that don't care or don't know about it have to deal with those kind of throughput issues and every once can configure like they prefer (as it is possible now) but IMO is a quite dangerous letting this as default

![image](https://user-images.githubusercontent.com/8322252/46265030-2dda9280-c4f9-11e8-9649-881dec444d3b.png)

Acording this with `For full international support, you'd need a VARCHAR of 15 digits.`
https://en.wikipedia.org/wiki/E.164

Thanks.

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.