Custom Authentication
Example
<input type="text" id="yomInput" placeholder="your name" autofocus>
<input type="password" id="password" placeholder="Enter password">
<button type="submit" data-callback="validatePassword" id="yomLaunch-1">start the experience</button>function validatePassword(onSuccess, onFailure) {
const passwordInput = document.getElementById('password');
const enteredPassword = passwordInput.value;
const hardcodedPassword = 'secure123'; // This is the hardcoded password
if (enteredPassword === hardcodedPassword) {
onSuccess(); // Call the success callback if the password is correct
} else {
onFailure(); // Call the failure callback if the password is incorrect
}
}Last updated
Was this helpful?
