Hi guys,
I’ve noticed that now we check if the username already exists when creating an UserAuth.
https://github.com/ServiceStack/ServiceStack/commit/d66e4b581f55bc78ddf1586ec910604a8e5555be#diff-5f3fac97801f1088108c4cc253e0e738R19
However, i have an use case where users are able to register through social accounts but they need to finish their registration where they provide a (unique) username. Therefore, since the same username might be used by different users in different social accounts (and in our application), i don’t want to deny the user registration upfront.
Having said that, i think that ValidateUniqueUserNames should be customizable.
It is customizable, i.e can be disabled with:
AuthProvider.ValidateUniqueUserNames = false;
Ricardo Brandão:
Hi Demis,
Yes, i saw that. But you have added the following comment
"//Temporary, remove later when no issues."
that led me to start this discussion. Are you planning to remove this possibility?
Was for unique emails, but I can leave them both there knowing that it’s being used.
Ricardo Brandão:
Cool, thanks!
IMHO emails should be unique since they are directly related to one person and one person only. So i guess that there is no problem removing that.
Cool, In that case I might switch the flags so they’re both properties on AuthFeature so it’s configurable like any other plugin.
Ricardo Brandão:
Sounds great
FYI config moved to AuthFeature, available in next release:
https://github.com/ServiceStack/ServiceStack/commit/0499b4c31b3664363c05381e775785b9adc56028
Ricardo Brandão:
Thanks