System Information
- Database: mongodb
- Node Version: 12.18.3
- NPM Version: 6.14.6
—hey guys I’m working on a full stack project with Strapi as backend and Nuxt as frontend and I got a problem with the user authentication . I don’t want a normal Auth for this project all I want for authentication is the phone number and a 6 code digit to send via SMS as the password for both login and sign up . and strapi user fields where locked . so I edited /extentions/models/user.settings.json all of the fields had configurable = false on em so I deleted that part form all of em and edited them the way I wanted em to be . this file (/extentions/models/user.settings.json) looks like this now
{
“kind”: “collectionType”,
“collectionName”: “users-permissions_user”,
“info”: {
“name”: “user”,
“description”: “”
},
“options”: {
“timestamps”: true
},
“attributes”: {
“email”: {
“type”: “email”,
“minLength”: 6,
“required”: false
},
“password”: {
“type”: “password”,
“private”: false
},
“blocked”: {
“type”: “boolean”,
“default”: false
},
“role”: {
“plugin”: “users-permissions”,
“model”: “role”,
“via”: “users”
},
“lastname”: {
“type”: “string”,
“required”: false
},
“firstName”: {
“type”: “string”,
“required”: false
},
“username”: {
“type”: “string”,
“required”: true
}
}
}
and now that im trying to use postman to create a new user im getting a 400 bad request from strapi the api im sending a post request to is http://localhost:1337/auth/local/register . and i send this in the body of the request
{
"username": "0123456789",
"password": "123456",
}
ps i use the phone number as username for em coz i thought it might cause a problem for the provider
and the error is
{
"statusCode": 400,
"error": "Bad Request",
"message": [
{
"messages": [
{
"id": "Auth.form.error.password.provide",
"message": "Please provide your password."
}
]
}
],
"data": [
{
"messages": [
{
"id": "Auth.form.error.password.provide",
"message": "Please provide your password."
}
]
}
]
}