@eka-care/sign-in
v0.0.12
Published
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.
Maintainers
Keywords
Readme
Eka Sign In SDK
Sign In 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_in: open root sign in screen.verify_txn: directly call verify api with parameters passed indatakey.oidc_verify_txn: specifically for calling verify for oidc. Can be merged withverify_txnmethod in the future.
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 In App</title>
<script src="https://login.eka.care/sdk/sign-in/js/sign-in.js"></script>
<link rel="stylesheet" href="https://login.eka.care/sdk/sign-in/css/sign-in.css"/>
</head>
<body>
<div id="signin_root"></div>
<script>
initAuthApp({
clientId: 'androidp',
containerId: 'signin_root',
method: 'sign_in',
platform: 'patient',
onSuccess: (params) => {
console.log('%c Line:117 🍕 onSuccessParams', 'color:#465975', params);
},
onError: (params) => {
console.log('%c Line:121 🥟 onErrorParams', 'color:#6ec1c2', params);
},
});
</script>
</body>
</html>