fix: skip challenge requirement for fixed test code
This commit is contained in:
+2
-1
@@ -164,7 +164,8 @@ func replyCreateUser(s *Session, msg *ClientComMessage, rec *auth.Rec) {
|
||||
}
|
||||
challengeID, _ = cr.Params["challenge_id"].(string)
|
||||
}
|
||||
if phone == "" || strings.TrimSpace(challengeID) == "" || strings.TrimSpace(cr.Response) == "" ||
|
||||
fixedTestCode, _ := cr.Params["fixed_test_code"].(bool)
|
||||
if phone == "" || (!fixedTestCode && strings.TrimSpace(challengeID) == "") || strings.TrimSpace(cr.Response) == "" ||
|
||||
(registrationPhone != "" && registrationPhone != phone) {
|
||||
s.queueOut(decodeStoreError(types.ErrCredentials, msg.Id, msg.Timestamp,
|
||||
map[string]any{"creds": []string{"tel"}}))
|
||||
|
||||
Reference in New Issue
Block a user