signUp
User registration (❗️For provider with user activation, activation code is sent through corresponding user notification method)
AuthProvider.signUp(marker, body, langCode)
Schema
marker:* string
The text identifier of the authorization provider
example: email
body:* ISignUpData
Request body
example:
{
"formIdentifier": "reg",
"authData": [
{ "marker": "login", "value": "example@oneentry.cloud" },
{ "marker": "password", "value": "12345" }
],
"formData": [
{ "marker": "last_name", "type": "string", "value": "Name" }
],
"notificationData": {
"email": "example@oneentry.cloud",
"phonePush": ["+99999999999"],
"phoneSMS": "+99999999999"
}
}
langCode: string
Language code
example: en_US
Method accept the body as a parameter.
Examples for body parameter with different types data:
Example with attributes of simple types formData "string", "integer", "float".
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "last_name",
"type": "string",
"value": "Fyodor Ivanov"
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [],
"phoneSMS": "+19991234567"
}
}
Example with attributes of types "date", "dateTime", "time"
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "birthday",
"type": "date",
"value": {
"fullDate": "2024-05-07T21:02:00.000Z",
"formattedValue": "08-05-2024 00:02",
"formatString": "DD-MM-YYYY HH:mm"
}
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [],
"phoneSMS": "+19991234567"
}
}
Example with attribute of type "text"
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "about",
"type": "text",
"value": {
"htmlValue": "<p>This is me</p>",
"plainValue": "",
"params": {
"isEditorDisabled": false,
"isImageCompressed": true
}
}
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [],
"phoneSMS": "+19991234567"
}
}
Example with attribute type "textWithHeader"
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "about",
"type": "textWithHeader",
"value": {
"header": "Header",
"htmlValue": "<p>This is me</p>",
"plainValue": "",
"params": {
"isEditorDisabled": false,
"isImageCompressed": true
}
}
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [],
"phoneSMS": "+19991234567"
}
}
Example with attributes type "image" and "groupOfImages"
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "avatar",
"type": "image",
"value": [
{
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
"downloadLink": "http://my-site.zone/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
"size": 392585,
"previewLink": "",
"params": {
"isImageCompressed": true
}
}
]
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [],
"phoneSMS": "+19991234567"
}
}
Example with attribute type "file"
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "picture",
"type": "file",
"value": [
{
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
"downloadLink": "http://my-site.zone/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
"size": 392585
}
]
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [],
"phoneSMS": "+19991234567"
}
}
Example with attributes type "radioButton" and "list"
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "selector",
"type": "list",
"value": [
{
"title": "red",
"value": "1",
"extended": {
"value": "red",
"type": "string"
}
}
]
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [],
"phoneSMS": "+19991234567"
}
}
Example with attribute type "entity" (nested list)
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "entity-selector",
"type": "entity",
"value": [
{
"id": "1",
"title": "red",
"value": "1",
"parentId": "null"
}
]
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [],
"phoneSMS": "+19991234567"
}
}
Example with one push identifier
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "selector",
"type": "list",
"value": [
{
"title": "red",
"value": "1",
"extended": {
"value": "red",
"type": "string"
}
}
]
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [
"7DD987F846400079F4B03C058365A4869047B4A0."
],
"phoneSMS": "+19991234567"
}
}
Example with multiple push identifiers
{
"formIdentifier": "reg",
"langCode": "en_US",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": {
"en_US": [
{
"marker": "selector",
"type": "list",
"value": [
{
"title": "red",
"value": "1",
"extended": {
"value": "red",
"type": "string"
}
}
]
}
]
},
"notificationData": {
"email": "test@test.zone",
"phonePush": [
"7DD987F846400079F4B03C058365A4869047B4A0",
"7DD987F846400079F4B03C058365A4869047B4A0",
"7DD987F846400079F4B03C058365A4869047B4A0."
],
"phoneSMS": "+19991234567"
}
}
const body = {
"formIdentifier": "reg",
"authData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
],
"formData": [
{
"marker": "last_name",
"type": "string",
"value": "Username"
}
],
"notificationData": {
"email": "test@test.com",
"phonePush": [],
"phoneSMS": "+99999999999"
}
}
const value = await AuthProvider.signUp('email', body)
Schema
formIdentifier: string
textual identifier of the authorization provider's form
example: reg_form
formData:
form data attached to the authorization provider
authData:
authorization data taken from the form attached to the authorization provider
example:
[
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
]
notificationData:
user notification data
attributeSetId: number
identifier for the used attribute set
example: 7
formData: FormDataLangType
Data submitted by the form
example:
{
"en_US": [
{
"marker": "marker_1",
"value": "Name"
}
]
}
notificationData: UserNotificationDataType
data for notifying the user
example:
{
"email": "test@test.zone",
"phonePush": "", "phoneSMS": "+19991234567"
}
systemCode: string
system code for performing official actions (password reset, activation)
example:
{
"value": "90BDCX",
"expiredDate": "2024-05-07T21:02:00.000Z"
}
formIdentifier: string
the text identifier of the authorization provider's form
example: reg_form
authData: FormAuthDataType
authorization data taken from the form linked to the authorization provider
example:
[
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
]
authProviderId: number
ID of the authorization provider
example: 1
This method will register a new user. Returns the registered user's object.
Example return:
{
"id": 1764,
"updatedDate": "2024-05-23T12:43:00.169Z",
"version": 10,
"identifier": "catalog",
"isActive": false,
"authProviderId": 1,
"formData": [
{
"marker": "login",
"value": "test"
},
{
"marker": "f-name",
"value": "Second name"
}
],
"notificationData": {
"email": "test@test.com",
"phonePush": ["+999999999"],
"phoneSMS": "+9999999999"
},
"systemCode": {
"value": "90BDCX",
"expiredDate": "2024-05-07T21:02:00.000Z"
}
}
Schema
id: number
object identifier
example: 1764
updatedDate: string
object modification date
version: number
object version number
example: 10
identifier: string
textual identifier for the field record
example: catalog
default: marker
attributeSetId: number
identifier for the used attribute set
example: 7
formData: FormDataLangType
Data submitted by the form
example:
{
"en_US": [
{
"marker": "marker_1",
"value": "Name"
}
]
}
notificationData: UserNotificationDataType
data for notifying the user
example:
{
"email": "test@test.zone",
"phonePush": "",
"phoneSMS": "+19991234567"
}
systemCode: string
system code for performing official actions (password reset, activation)
example:
{
"value": "90BDCX",
"expiredDate": "2024-05-07T21:02:00.000Z"
}
formIdentifier: string
the text identifier of the authorization provider's form
example: reg_form
authData: FormAuthDataType
authorization data taken from the form linked to the authorization provider
example:
[
{
"marker": "login",
"value": "test"
},
{
"marker": "password",
"value": "12345"
}
]
authProviderId: number
ID of the authorization provider
example: 1