skygear-server
skygear-server copied to clipboard
User duplicated error should come before password check
On registering a duplicated user, he will first got password complexity error before user duplicate error.
- Skygear Server Date/Version: v1.3.1-36-g37291e0
- Application Platform:
- [ ] Is this a regression?
- [ ] Attached logs, screenshots
Expected Results
If an existing user try to signin again. He will got user duplicated error regardless what password he provided.
Actual Results
Password complexity error comes first, user duplicated error comes after.
Steps to reproduce
- Signup an account
{
"action": "auth:signup",
"api_key": "som_api_key",
"auth_data": {
"email": "[email protected]"
},
"password": "!@#$%^"
}
{
"action": "auth:signup",
"api_key": "som_api_key",
"auth_data": {
"email": "[email protected]"
},
"password": "123456"
}
Response (Or other password check error)
{
"error": {
"code": 132,
"message": "password containing excluded keywords",
"name": "PasswordContainingExcludedKeywords"
}
}
{
"action": "auth:signup",
"api_key": "som_api_key",
"auth_data": {
"email": "[email protected]"
},
"password": "123456"
}
Response
{
"error": {
"code": 109,
"message": "user duplicated",
"name": "Duplicated"
}
}