Custom property added that to be unique for all users

here I have mobile as a custom property,

"user_metadata": {
    "mobile": "8373886873",
    "phone_verified": true

and how can I make it unique among all the users mobile property?
can I make this mobile number as a default login username instead of email?

You will need to make a Management API call to ensure that is unique. This can be done from your backend with the following Lucene syntax query, which will return any users that have the same phone number in"MOBILE_NUMBER"

If you’d like to use the mobile phone number as the login username, you can use a database connection with Requires username enabled: