Optional
access_token: stringTo complete account linking, call completeLinkAccount().
Optional
access_token: stringTo use the existing users in deduplication, you need to call deduplicationLogin().
To delete the user account directly in the application, call deleteUserAccount(). Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/x133xdifl1sx9-schedule-user-deletion for more details.
Once registration successful, verify the account based on the flow. To get the details, call getCommunicationStatus().
Optional
headers: HTTPRequestHeaderTo get the list of existing users in deduplication, call getDeduplicationDetails().
Optional
headers: HTTPRequestHeaderto get information about invitation details, call getInviteUserDetails(). This API allows to retrieve invitation details and prefill the registration form. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/0b5efa5a2db5d-prefill-the-user-invitation for more details. Minimum cidaas version to use latest api is v3.100
Optional
headers: HTTPRequestHeaderconst options = {
invite_id: 'id of user invitation'
callLatestAPI: 'true' // call latest api if parameter is given. By default, the older api will be called
}
cidaasUserService.getInviteUserDetails(options)
.then(function () {
// the response will give you information about the invitation.
}).catch(function (ex) {
// your failure code here
});
To handle registration, first you need the registration fields. To get the registration fields, call getRegistrationSetup(). This will return the fields that has to be needed while registration. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/4eae72956f65a-registration-field-setup for more details.
To get user activities, call getUserActivities(). Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/346141453781e-get-user-activities for more details.
Optional
access_token: stringTo get the user profile information by using cidaas internal api, call getUserProfile(). Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/2zfvjx3vtq6g6-get-user-info for more details.
Optional
options: GetUserProfileRequestTo handle the reset password by entering the verification code you received, call handleResetPassword(). This will check if your verification code was valid or not, and allows you to proceed to the next step. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/3t8ztokeb7cfz-handle-reset-password for more details.
Optional
handleResponseAsJson: booleanOptional
headers: HTTPRequestHeaderconst handleResponseAsJson = 'true if the response need to be handled the old way (as json). In the current handling, the response information will be given as query parameter in redirect url.';
cidaasUserService.handleResetPassword({
code: 'your code in email or sms or ivr',
resetRequestId: 'your resetRequestId' // which you will get on initiate reset password response
}, handleResponseAsJson).then(function (response) {
// the response will give you valid verification code.
}).catch(function(ex) {
// your failure code here
});
To initiate account linking, call initiateLinkAccount().
Optional
access_token: stringconst options = {
master_sub: 'sub of the user who initiates the user link',
user_name_to_link: 'username of the user which should get linked',
user_name_type: 'type of user name to link. E.g. email'
}
cidaasUserService.initiateLinkAccount(options).then((response) => {
// your success code
}).catch((err) => {
// your failure code here
});
To initiate the password resetting, call initiateResetPassword(). This will send verification code to your email or mobile based on the resetMedium you mentioned. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/6b29bac6002f4-initiate-password-reset for more details.
Optional
headers: HTTPRequestHeadercidaasUserService.initiateResetPassword({
email: 'xxxxxx@xxx.com',
processingType: ProcessingType.Code,
requestId: 'your requestId',
resetMedium: ResetMedium.Email
}).then(function (response) {
// the response will give you password reset details.
}).catch(function(ex) {
// your failure code here
});
To register user, call register(). This method will create a new user. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/427632e587203-register-a-new-user for more details. Note: Only requestId in the headers is required.
const headers = {
requestId: 'your_received_requestId',
captcha: 'captcha',
acceptlanguage: 'acceptlanguage',
bot_captcha_response: 'bot_captcha_response'
};
cidaasUserService.register({
email: 'xxx123@xxx.com',
given_name: 'xxxxx',
family_name: 'yyyyy',
password: '123456',
password_echo: '123456',
provider: 'your provider', // FACEBOOK, GOOGLE, SELF
acceptlanguage: 'your locale' // optional example: de-de, en-US
}, headers).then(function (response) {
// the response will give you client registration details.
}).catch(function(ex) {
// your failure code here
});
To register new user in deduplication, call registerDeduplication().
Optional
headers: HTTPRequestHeaderTo finish reseting the password, call resetPassword(). This will allow you to change your password. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/qa9ny0gkzlf6y-accept-reset-password for more details.
Optional
handleResponseAsJson: booleanOptional
headers: HTTPRequestHeaderconst handleResponseAsJson = 'true if the response need to be handled the old way (as json). In the current handling, user will be redirected to success page after successful reset password.';
cidaasUserService.resetPassword({
password: '123456',
confirmPassword: '123456',
exchangeId: 'your exchangeId', // which you will get on handle reset password response
resetRequestId: 'your resetRequestId' // which you will get on handle reset password response
}).then(function (response) {
// the response will give you reset password details.
}).catch(function(ex) {
// your failure code here
});
To update the user profile information, call updateProfile(). After updating the user profile, the information in user storage won't be automatically updated. To get the latest user profile information, you will need to call getUserProfile(). To update the user storage, you will need to call renewToken() to generate latest tokens (access token, id token, refresh token) & user informations. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/i3uqnxcpxr19r-update-user-profile for more details.
Optional
access_token: stringcidaasUserService.updateProfile({
family_name: 'Doe',
given_name: 'John',
provider: 'self',
acceptlanguage: 'your locale' // optional example: de-de, en-US
}, 'your sub' ).then(function () {
// the response will give you updated user profile info.
}).catch(function (ex) {
// your failure code here
});
To change profile image, call updateProfileImage().
Optional
access_token: stringTo run predefined action after enrollment, call userActionOnEnrollment()
To check if user exists, call userCheckExists(). Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/4yh82qism78xf-find-user-by-identifier for more details.
Optional
headers: HTTPRequestHeader
To change the password, call changePassword(). This will allow you to change your password. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/8221883241464-change-password for more details.