my users more than 90% don’t use email in china,they usually used Wechat register&login,but i don’t know how to change strapi v4 default identifier from email to phonenumber,please tell me how to change,thanks:grinning:。Excuse me, my English is poor.
To switch the main way of identifying users from email to phone number in Strapi v4, follow these steps: First, open the file named “config/auth.json.” Inside this file, locate the property named “identifier” and change its value from “email” to “phone_number.” Make sure to save the file afterward. Once this is done, you’ll need to make a new user by sending a special type of request (called a POST request) to a place in Strapi called “auth/local/register.” This request should include certain information about the user, such as their email address (if available), phone number, and password. Here’s an example of what this request might look like:
POST /api/auth/local/register
Content-Type: application/json
If this request works correctly, Strapi will create a new user and send back some information about them. If you’re using an extra tool (called a plugin) to let users log in with their phone numbers, you might need to set up the plugin to use phone numbers instead of emails for identification. The exact steps for doing this can be different depending on which plugin you’re using. Feel free to ask if you need more help!
thanks for your reply bro。i want to create account just for phonenumber、username and password,cuz users don’t even have an email ,but why my project directory absent config/auth.json file?it’s need create by myself?