Add mobile and phone number to register endpoint
MODIFY
src/assets/server/rest/v1/schemas/auth/auth-signon.json
src/assets/server/rest/v1/schemas/auth/auth-signon.json
"captcha": {
"$ref": "common#/definitions/captcha"
},
+ "phone": {
+ "$ref": "user#/definitions/phone"
+ },
+ "mobile": {
+ "$ref": "user#/definitions/mobile"
+ },
"locale": {
"type": "string",
"sanitize": "mongo",

MODIFY
src/server/rest/v1/service/AuthService.ts
src/server/rest/v1/service/AuthService.ts
@@ -160,6 +160,8 @@ export default class AuthService {
newUser.name = filteredRequest.name;
newUser.firstName = filteredRequest.firstName;
newUser.locale = filteredRequest.locale;
+ newUser.mobile = filteredRequest.mobile;
+ newUser.phone = filteredRequest.phone;
newUser.createdOn = new Date();
const verificationToken = Utils.generateToken(filteredRequest.email);
const endUserLicenseAgreement = await UserStorage.getEndUserLicenseAgreement(tenant, Utils.getLanguageFromLocale(newUser.locale));

MODIFY
src/storage/mongodb/UserStorage.ts
src/storage/mongodb/UserStorage.ts
@@ -1014,6 +1014,8 @@ export default class UserStorage {
issuer: true,
name: 'Unknown',
firstName: 'User',
+ mobile: '',
+ phone: '',
email: '',
address: null,
createdBy: null,

MODIFY
src/types/requests/HttpUserRequest.ts
src/types/requests/HttpUserRequest.ts
@@ -82,6 +82,8 @@ export interface HttpRegisterUserRequest extends HttpLoginRequest {
captcha: string;
status: string;
locale: string;
+ mobile?: string;
+ phone?: string;
}
export interface HttpVerifyEmailRequest {

Add mobile and phone number to register endpoint