diff --git a/BimAI.API/appsettings.Development.json b/BimAI.API/appsettings.Development.json index fedb42c..e288f74 100644 Binary files a/BimAI.API/appsettings.Development.json and b/BimAI.API/appsettings.Development.json differ diff --git a/BimAI.UI.Shared/wwwroot/js/auth.js b/BimAI.UI.Shared/wwwroot/js/auth.js index babb6b8..1f04e55 100644 --- a/BimAI.UI.Shared/wwwroot/js/auth.js +++ b/BimAI.UI.Shared/wwwroot/js/auth.js @@ -28,7 +28,7 @@ async function handleAuthError(error, context = '') { const errorMessage = error?.message || error?.type || error?.toString() || 'Unknown error'; const fullError = `${context}: ${errorMessage}`; console.error('Google Auth Error:', { context, error, fullError }); - await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError', fullError); + await DotNet.invokeMethodAsync('BimAI.UI.Shared', 'OnGoogleSignInError', fullError); } async function fetchUserInfo(accessToken) { @@ -39,7 +39,7 @@ async function fetchUserInfo(accessToken) { if (!response.ok) { const errorText = await response.text(); console.error('Failed to fetch user info:', errorText); - await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError', + await DotNet.invokeMethodAsync('BimAI.UI.Shared', 'OnGoogleSignInError', `Failed to fetch user info: HTTP ${response.status}`); return null; } @@ -62,7 +62,7 @@ window.initGoogleSignIn = async function(clientId) { try { if (tokenResponse.error) { console.error('Token response error:', tokenResponse.error); - await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError', + await DotNet.invokeMethodAsync('BimAI.UI.Shared', 'OnGoogleSignInError', tokenResponse.error); return; } @@ -70,7 +70,7 @@ window.initGoogleSignIn = async function(clientId) { const userInfo = await fetchUserInfo(tokenResponse.access_token); if (!userInfo) return; - await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInSuccess', + await DotNet.invokeMethodAsync('BimAI.UI.Shared', 'OnGoogleSignInSuccess', tokenResponse.access_token, userInfo.name || '', userInfo.email || '', @@ -78,7 +78,7 @@ window.initGoogleSignIn = async function(clientId) { ); } catch (error) { console.error('Callback error:', error); - await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError', + await DotNet.invokeMethodAsync('BimAI.UI.Shared', 'OnGoogleSignInError', error.message || 'Unknown callback error'); } finally { isSigningIn = false; @@ -86,7 +86,7 @@ window.initGoogleSignIn = async function(clientId) { }, error_callback: async (error) => { console.error('OAuth flow error:', error); - await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError', + await DotNet.invokeMethodAsync('BimAI.UI.Shared', 'OnGoogleSignInError', error.type || 'OAuth flow error'); isSigningIn = false; } @@ -95,7 +95,7 @@ window.initGoogleSignIn = async function(clientId) { return googleClient; } catch (error) { console.error('Initiaxcrun xctrace list deviceslization error:', error); - await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError', + await DotNet.invokeMethodAsync('BimAI.UI.Shared', 'OnGoogleSignInError', error.message || 'Failed to initialize Google Sign-In'); isSigningIn = false; } @@ -109,7 +109,7 @@ window.requestGoogleSignIn = async function() { if (!googleClient) { console.error('Google Sign-In not initialized'); - await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError', + await DotNet.invokeMethodAsync('BimAI.UI.Shared', 'OnGoogleSignInError', 'Google Sign-In not initialized. Call initGoogleSignIn first.'); return; } diff --git a/BimAI.UI.Web/appsettings.Development.json b/BimAI.UI.Web/appsettings.Development.json index 8c786ed..39029d4 100644 Binary files a/BimAI.UI.Web/appsettings.Development.json and b/BimAI.UI.Web/appsettings.Development.json differ