3. Integrate Bayun SDK
3.1 Add Bayun SDK into Project
Import bayun.js file into index.html
Copy the bayun.js file in the project public folder.
3.2 Add Bayun Dependencies
The following dependency is needed to use Facial Recognition for added protection at the time of login.
Import vishwam-lib.js file into index.html
Copy the vishwam-lib.js and models directory in the project folder.
3.3 Initialize BayunCore
Get BayunCore instance with appId, appSecret, appSalt, localStorageMode, enableFaceRecognition.
appId : Provided when an app is registered with Bayun.
appSecret : Provided when an app is registered with Bayun.
appSalt : Provided when an app is registered with Bayun.
localStorageMode : It can be
SESSION_MODE
orEXPLICIT_LOGOUT_MODE
SESSION_MODE
: User data is encrypted and stored locally in sessionstorage. User data gets cleared when the page session ends and user will have to login with Bayun again.EXPLICIT_LOGOUT_MODE
: User data is encrypted and stored locally in localstorage. User data is kept in localstorage until the user logs out.
enableFaceRecognition : Boolean variable to determine whether or not to enable Face ID registration for a new user as an extra security measure. This Face ID works independently of the device-specific biometric (if any) available on the user’s end-device, and works from any device with a camera (including laptops and Android phones that may not have the built-in Face ID functionality). If enabled at the time of BayunCore init, each user can still decide on their own at the time of account registration if they want to also register their Face ID. If so chosen by the user at the time of account registration, they will be prompted to validate their Face ID every time they login from a new device. Check Register without Password function for more details.
baseURL : Provided when an app is registered with Bayun.
bayunServerPublicKey : Provided when an app is registered with Bayun.
Last updated