find was deleting important env files

This commit is contained in:
usmannasir
2025-10-01 01:28:40 +05:00
parent de892ee4fd
commit 873f88a3c6
3 changed files with 98 additions and 13 deletions

View File

@@ -0,0 +1,45 @@
/**
* CyberPanel WebAuthn/Passkey Authentication Module
* Handles passwordless authentication using WebAuthn API
*/
(function() {
'use strict';
// Check if WebAuthn is supported
const isSupported = function() {
return !!(navigator.credentials && navigator.credentials.create && navigator.credentials.get);
};
// Initialize the module
const init = function() {
if (!isSupported()) {
console.log('WebAuthn is not supported in this browser');
return false;
}
console.log('WebAuthn support detected');
return true;
};
// Start passwordless login flow
const startPasswordlessLogin = function() {
console.log('Passwordless login not yet implemented');
// TODO: Implement WebAuthn authentication flow
alert('Passkey authentication will be available in a future update');
};
// Export functions to global scope
window.cyberPanelWebAuthn = {
isSupported: isSupported,
init: init,
startPasswordlessLogin: startPasswordlessLogin
};
// Initialize on load
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();