Authentication

Catalyst Authentication features enable you to add end-users to your Catalyst serverless applications, configure their user accounts and roles, and manage user sign-in and authentication of your application. You can learn about working with Catalyst Authentication from the remote console from the Authentication help document.

Add New User

When a user has signed up to a Catalyst application, unique identification values like ZUID and userID are created for them. The user is also assigned to an organization by Catalyst. You can learn more about this from the Users help page.

You can add a new end-user to your Catalyst application using the code below. The user details such as their email address, last name, the application platform and the role they must be added to, are passed through an instance of the ZCSignUpData class. The user registration process is handled by the registerUser() method, after obtaining an instance of the ZCUser class.

Note:
  • You will be able to add only 25 users in your application in the development environment. After you deploy your application to production, you can include any number of end-users in it.
  • You must provide the values for EmailId and FirstName to register a user mandatorily.
  • You can obtain the RoleId from the Roles section in Authentication in the Catalyst console.
  • When inviting a new user, you can configure the sender’s email address, subject and the email message. You must add the email address in the Catalyst Mail Component and get it verified before using it in the SDK code.

Ensure the following packages are imported:

    
copy
import com.zc.component.users.PlatformType; import com.zc.component.users.ZCSignUpData; import com.zc.component.users.ZCUser; import com.zc.component.ZCMailTemplateDetails;
    
copy
//Get an instance of ZCSignUpData ZCSignUpData signUpdetails = ZCSignUpData.getInstance(); //Pass the necessary data for the sign-up using the instance ZCMailTemplateDetails mailData= signUpdetails.mailTemplateInstance(); mailData.setSendersMail("docofoh552@lukaat.com"); mailData.setSubject("Welcome to %APP_NAME%"); mailData.setMessage("

Hello ,

Follow this link to join in %APP_NAME% .

%LINK%

If you didn’t ask to join the application, you can ignore this email.

Thanks,

Your %APP_NAME% team

"); signUpdetails.setTemplateDetails(mailData); signUpdetails.setPlatformType(PlatformType.WEB); signUpdetails.userDetail.setEmailId("p.boyle@zylker.com"); signUpdetails.userDetail.setLastName("Boyle"); signUpdetails.userDetail.setRoleId(1256000000228024L); //Register the user using an instance of ZCUser class signUpdetails = ZCUser.getInstance().registerUser(signUpdetails);

Last Updated 2023-10-16 12:55:33 +0530 +0530