From 9b3af0b5ea141447a3cd80755b5072b3cf895828 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Thu, 23 Oct 2025 22:02:35 +0200 Subject: [PATCH] fix: improve WebAuthn button visibility and add debug logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations :** - WebAuthn window not appearing due to button visibility issues - Add debug logging to troubleshoot authentication flow - Ensure authentication button is clearly visible to user - Improve user experience with better styling and feedback **Modifications :** - Added inline styles to authentication button for better visibility - Added comprehensive debug logging to track button creation and click events - Improved button styling with centered layout and clear visual hierarchy - Added error handling for missing DOM elements - Enhanced user feedback with clear instructions **Pages affectΓ©es :** - src/pages/home/home.ts: Enhanced button visibility and debug logging --- src/pages/home/home.ts | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/pages/home/home.ts b/src/pages/home/home.ts index 567184e..151e500 100755 --- a/src/pages/home/home.ts +++ b/src/pages/home/home.ts @@ -548,20 +548,45 @@ async function handleMainPairing(): Promise { try { // Show authentication button that requires user interaction + console.log('πŸ” DEBUG: mainStatus element:', mainStatus); if (mainStatus) { + console.log('πŸ” DEBUG: Setting up authentication button...'); mainStatus.innerHTML = ` -
-

πŸ” Secure authentication required

- -

Click the button above to authenticate with your browser

+
+

πŸ” Secure authentication required

+ +

Click the button above to authenticate with your browser

`; + console.log('πŸ” DEBUG: Authentication button HTML set'); + } else { + console.error('❌ mainStatus element not found!'); + throw new Error('Main status element not found'); } // Wait for user to click the authentication button await new Promise((resolve, reject) => { + console.log('πŸ” DEBUG: Looking for authButton...'); const authButton = document.getElementById('authButton') as HTMLButtonElement; + console.log('πŸ” DEBUG: authButton found:', authButton); if (!authButton) { + console.error('❌ Authentication button not found in DOM'); reject(new Error('Authentication button not found')); return; }