systemBehaviorConfigurations:
referralSystemEnabled: boolean(true/false) -> Referral system in ProfileApi that awards bonuses to users if someone used their referral code during registration.
referralProperty:
referralCodeLength: int
referralStartBonus: int
registrationBonus: int
multifactorAuthentication:
multifactorAuthSystemEnabled: boolean(true/false) -> Multi factor authentication during login flow
registration:
emailRegistrationEnabled: boolean(true/false) -> Registration via email
phoneRegistrationEnabled: boolean(true/false) -> Registration via phone number
registrationViaInviteLinkEnabled: boolean(true/false) -> Registration Via Invite link FLOW
registrationWithVerificationEnabled: boolean(true/false) -> Default Registration FLOW
oauth2:
facebook: true -> Login via Facebook. If a user logs in for the first time, we automatically register him.
google: true -> Login via Google. If a user logs in for the first time, we automatically register him.
Registration FLOW
registrationWithVerificationEnabled: true
First step → start registration operation
endpoint → /api/v1/registration
Request body:
{
"userKey": "a.kinashchuk@gmail.com" or "+123456789" -> email or phone number
"referralCode": null -> OPTIONAL
}
- emailRegistrationEnabled: true
- phoneRegistrationEnabled: true
- referralSystemEnabled: true
{
"userKey": "+12345678" -> ONLY PHONE NUMBER!
"referralCode": null -> OPTIONAL
}
- emailRegistrationEnabled: false
- phoneRegistrationEnabled: true
- referralSystemEnabled: true
{
"userKey": "a.kinashchuk@gmail.com" -> ONLY EMAIL!
"referralCode": null -> OPTIONAL
}
- emailRegistrationEnabled: true
- phoneRegistrationEnabled: false
- referralSystemEnabled: true
{
"userKey": "a.kinashchuk@gmail.com" or "+123456789" -> email or phone number
}
Referral System is not present in Profile-API
- emailRegistrationEnabled: false
- phoneRegistrationEnabled: true
- referralSystemEnabled: false
Response
"processingId": "8bfd90a9-949b-42e6-aae4-1690ce339721" -> UUID format
Second step → send registration one time token
endpoint: → /api/v1/token/registration/verification/{processingId}
processingId -> Processing after first step.
Response
Http.OK(200)
Third step → verify registration one time token
endpoint → /api/v1/registration/verification
Request body:
{
"processingId": "processingId", -> Processing after first step.
"oneTimeToken": "123456", -> Token that came to you on your userKey. (Valid token -> 6 digits)
"isMfaEnabled": true -> OPTIONAL!!!
}
- multifactorAuthSystemEnabled: true
if user sets the isMFAEnabled attribute to true, then MfaStep is enabled for the userKey under which he registers (mail or phone). And when logging in, he will need to request a token for verification.
{
"processingId": "processingId", -> Processing after first step.
"oneTimeToken": "{{123456}", -> Token that came to you on your userKey. (Valid token -> 6 digits)
}
- multifactorAuthSystemEnabled: false → In this case, mfa is disabled in our system. And the user will not need to request tokens for verification when logging in.
Response
Http.OK(200)
Final Step -> provide password and confirm registration
endpoint → /api/v1/registration/confirmation
Request body:
{
"processingId": "processingId", -> Processing after first step.
"password": "Qwerty123-" -> Valid password
}
Response:
Http.OK(200)
The user has been successfully registered.
Invite Registration FLOW
registrationViaInviteLinkEnabled: true
FIRST STEP
endpoint → /api/v1/account/invite → private endpoint. This means this operation is only available to authorized users.
Request Body:
{
"email" : "new-user-by-invitation@gmail.com"
}
Response
Http.OK(200) -> A invite link will be sent to the email address you provided in your request.
Second Step → open invite link with encrypted token
endpoint → /api/v1/registration/link?token=
token = This is an encrypted token that stores information about who the invitation was sent to and the expiration time of this invitation.
Response
"processingId": "8bfd90a9-949b-42e6-aae4-1690ce339721" -> UUID format
Third step → send registration one time token
endpoint: → /api/v1/token/registration/verification/{processingId}
processingId -> Processing after first step.
Response Http.OK(200)
Fourth step → verify registration one time token
endpoint → /api/v1/registration/verification
Request body:
{
"processingId": "processingId", -> Processing after first step.
"oneTimeToken": "123456", -> Token that came to you on your userKey. (Valid token -> 6 digits)
"isMfaEnabled": true -> OPTIONAL!!!
}
- multifactorAuthSystemEnabled: true
if user sets the isMFAEnabled attribute to true, then MfaStep is enabled for the userKey under which he registers (mail or phone). And when logging in, he will need to request a token for verification.
{
"processingId": "processingId", -> Processing after first step.
"oneTimeToken": "{{123456}", -> Token that came to you on your userKey. (Valid token -> 6 digits)
}
- multifactorAuthSystemEnabled: false → In this case, mfa is disabled in our system. And the user will not need to request tokens for verification when logging in.
Response
Http.OK(200)
Final Step -> provide password and confirm registration
endpoint → /api/v1/registration/confirmation
Request body:
{
"processingId": "processingId", -> Processing after first step.
"password": "Qwerty123-" -> Valid password
}
Response:
Http.OK(200)
The user has been successfully registered.
Validation Patterns → https://docs.google.com/document/d/1uNrAO3Adzzkfxad9Hl0qZxTjUnYPmIa0Xr-lKP8Ej0E/edit?pli=1#heading=h.6yz86caf2j1r
0 Comments