@eka-care/sign-up
v0.0.5
Published
## Sign Up Initialisation Methods
Downloads
13
Maintainers
Keywords
Readme
Eka Sign Up SDK
Sign Up Initialisation Methods
TMethod is used to control what sign up flow to open on init of the sdk. This can be used for landing on a specific screen, or for more finer control if there are multiple flow in the same screen.
Possible values of TMethod and what they do:
sign_up: open root sign up screen.workspace_with_identifier: adding a new workspace. The user already has existing workspaces.join_workspace: if the user is trying to join a specific workspace. Initiated only from sign-in app at the moment.signup_welcome: First time creating a workspace.create_profile: Lands the user directly to the create profile form. To be renamed tocreate_profile_form.
Example
Here is a complete example of how to integrate the SDK:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EKA Sign Up App</title>
<script src="https://login.eka.care/sdk/sign-up/js/sign-up.js"></script>
<link rel="stylesheet" href="https://login.eka.care/sdk/sign-up/css/sign-up.css" />
</head>
<body>
<div id="sign_up_root"></div>
<script>
window.initSignUp({
clientId: 'androiddoc',
containerId: 'sign_up_root',
platform: 'doctor',
method: 'sign_up',
// data: {
// identifier: 'dsfsfd',
// txn_id: 'dfds',
// workspace_name: 'dsfdsfs',
// },
onSuccess: (params) => {
console.log('%c Line:117 🍕 onSuccessParams', 'color:#465975', params);
},
onError: (params) => {
console.log('%c Line:121 🥟 onErrorParams', 'color:#6ec1c2', params);
},
// onClose: () => {
// console.log('%c Line:121 🥟 onClose', 'color:#6ec1c2');
// },
});
</script>
</body>
</html>