<@U04UQ68083H> is it different when i create a new...
# ory-copilot
s
@chilly-king-10285 is it different when i create a new identity with username "VN001abc" and "VN001abC", ory kratos
b
A message from kapa.ai
Yes, there is a difference when creating identities with usernames "VN001abc" and "VN001abC" in Ory Kratos, but it depends on how these usernames are used. For password credentials, Ory Kratos lowercases all password identifiers. This means that if you're using these usernames as password identifiers, "VN001abc" would be treated the same as "VN001abC" during authentication. As stated in the documentation: > It's important to understand that Ory Identities lowercases all
password
identifiers and therefore email addresses. > -
userNAME
is equal to
username
[Customize identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#choosing-between-username-email-and-phone-number) However, the original case is preserved in the identity traits themselves. So if you're using these usernames for display purposes or other non-authentication functions, the case difference would be maintained in the stored identity. When creating custom identity schemas with usernames as identifiers, you would define them in your schema like this:
Copy code
json {   "properties": {     "traits": {       "properties": {         "username": {           "type": "string",           "<http://ory.sh/kratos|ory.sh/kratos>": {             "credentials": {               "password": {                 "identifier": true               }             }           }         }       }     }   } }
This configuration would allow users to log in with their username, but the authentication process would treat "VN001abc" and "VN001abC" as identical for login purposes.