5.1 Register with Password
Sample Code
const sessionId = "<sessionId>";
const companyName = "bayunsystems.com"; // company portion from loginId
const companyEmployeeId = "username"; // username portion from loginId
const password = "<employeePassword>";
const successCallback = data => {
//Employee Registered Successfully
//Login to continue.
};
const failureCallback = error => {
console.error(error);
};
const authorizeEmployeeCallback = (data) => {
if (data.sessionId) {
if (data.authenticationResponse == BayunCore.AuthenticateResponse.AUTHORIZATION_PENDING) {
// You can get employeePublicKey in data.employeePublicKey for it's authorization
}
}
};
bayunCore.registerEmployeeWithPassword(
sessionId
companyName,
companyEmployeeId,
password,
authorizeEmployeeCallback,
successCallback,
failureCallback
);Last updated