@proveanything/smartlinks-auth-ui 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +20 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -12448,9 +12448,9 @@ const detectWebView = () => {
|
|
|
12448
12448
|
console.log(`${LOG_PREFIX} ✅ Android WebView detected (wv in UA)`);
|
|
12449
12449
|
return true;
|
|
12450
12450
|
}
|
|
12451
|
-
// Check for
|
|
12452
|
-
if (typeof window.
|
|
12453
|
-
console.log(`${LOG_PREFIX} ✅ Android WebView detected (
|
|
12451
|
+
// Check for AuthKit native bridge
|
|
12452
|
+
if (typeof window.AuthKit !== 'undefined') {
|
|
12453
|
+
console.log(`${LOG_PREFIX} ✅ Android WebView detected (AuthKit bridge exists)`);
|
|
12454
12454
|
return true;
|
|
12455
12455
|
}
|
|
12456
12456
|
console.log(`${LOG_PREFIX} ❌ Android but not WebView`);
|
|
@@ -12472,9 +12472,9 @@ const detectWebView = () => {
|
|
|
12472
12472
|
return false;
|
|
12473
12473
|
};
|
|
12474
12474
|
const getNativeBridge = () => {
|
|
12475
|
-
console.log(`${LOG_PREFIX} 🔍 getNativeBridge checking for
|
|
12476
|
-
console.log(`${LOG_PREFIX} 🔍 window.
|
|
12477
|
-
const native = window.
|
|
12475
|
+
console.log(`${LOG_PREFIX} 🔍 getNativeBridge checking for AuthKit bridge...`);
|
|
12476
|
+
console.log(`${LOG_PREFIX} 🔍 window.AuthKit:`, window.AuthKit);
|
|
12477
|
+
const native = window.AuthKit;
|
|
12478
12478
|
if (native?.signInWithGoogle) {
|
|
12479
12479
|
console.log(`${LOG_PREFIX} ✅ Native bridge found!`, {
|
|
12480
12480
|
signInWithGoogle: !!native.signInWithGoogle,
|
|
@@ -12483,7 +12483,7 @@ const getNativeBridge = () => {
|
|
|
12483
12483
|
});
|
|
12484
12484
|
return native;
|
|
12485
12485
|
}
|
|
12486
|
-
console.log(`${LOG_PREFIX} ❌ No native bridge found (
|
|
12486
|
+
console.log(`${LOG_PREFIX} ❌ No native bridge found (AuthKit.signInWithGoogle not available)`);
|
|
12487
12487
|
return null;
|
|
12488
12488
|
};
|
|
12489
12489
|
// Sign out from Google on the native side (clears cached Google account)
|
|
@@ -12523,7 +12523,7 @@ const signOutGoogleNative = async () => {
|
|
|
12523
12523
|
});
|
|
12524
12524
|
console.log(`${LOG_PREFIX} 🚪 Calling nativeBridge.signOutGoogle with payload:`, payload);
|
|
12525
12525
|
// Use non-null assertion - method exists (verified by guard check above)
|
|
12526
|
-
// IMPORTANT: Must call directly on nativeBridge object for
|
|
12526
|
+
// IMPORTANT: Must call directly on nativeBridge object for WebView proxy binding
|
|
12527
12527
|
nativeBridge.signOutGoogle(payload);
|
|
12528
12528
|
});
|
|
12529
12529
|
};
|
|
@@ -12581,7 +12581,7 @@ const checkSilentGoogleSignIn = async (clientId, googleClientId) => {
|
|
|
12581
12581
|
});
|
|
12582
12582
|
console.log(`${LOG_PREFIX} 🔇 Calling nativeBridge.checkGoogleSignIn with payload:`, payload);
|
|
12583
12583
|
// Use non-null assertion - method exists (verified by guard check above)
|
|
12584
|
-
// IMPORTANT: Must call directly on nativeBridge object for
|
|
12584
|
+
// IMPORTANT: Must call directly on nativeBridge object for WebView proxy binding
|
|
12585
12585
|
nativeBridge.checkGoogleSignIn(payload);
|
|
12586
12586
|
});
|
|
12587
12587
|
};
|
|
@@ -13427,22 +13427,22 @@ const SmartlinksAuthUI = ({ apiEndpoint, clientId, clientName, accountData, onAu
|
|
|
13427
13427
|
log.log('Invoking native signInWithGoogle with payload:', payloadObj);
|
|
13428
13428
|
// 🔍 DEBUG: Re-validate bridge before invocation
|
|
13429
13429
|
console.log(`${LOG_PREFIX} 🔍 Re-validating bridge before invocation...`);
|
|
13430
|
-
console.log(`${LOG_PREFIX} 🔍 window.
|
|
13431
|
-
console.log(`${LOG_PREFIX} 🔍 window.
|
|
13432
|
-
console.log(`${LOG_PREFIX} 🔍 typeof signInWithGoogle:`, typeof window.
|
|
13433
|
-
console.log(`${LOG_PREFIX} 🔍 nativeBridge === window.
|
|
13430
|
+
console.log(`${LOG_PREFIX} 🔍 window.AuthKit:`, window.AuthKit);
|
|
13431
|
+
console.log(`${LOG_PREFIX} 🔍 window.AuthKit.signInWithGoogle:`, window.AuthKit?.signInWithGoogle);
|
|
13432
|
+
console.log(`${LOG_PREFIX} 🔍 typeof signInWithGoogle:`, typeof window.AuthKit?.signInWithGoogle);
|
|
13433
|
+
console.log(`${LOG_PREFIX} 🔍 nativeBridge === window.AuthKit:`, nativeBridge === window.AuthKit);
|
|
13434
13434
|
console.log(`${LOG_PREFIX} 🔍 nativeBridge.signInWithGoogle:`, nativeBridge.signInWithGoogle);
|
|
13435
13435
|
console.log(`${LOG_PREFIX} 🔍 typeof nativeBridge.signInWithGoogle:`, typeof nativeBridge.signInWithGoogle);
|
|
13436
13436
|
// 🔍 DEBUG: Bridge method comparison
|
|
13437
13437
|
console.log(`${LOG_PREFIX} 🔍 Bridge method comparison:`);
|
|
13438
|
-
const
|
|
13439
|
-
if (
|
|
13440
|
-
console.log(`${LOG_PREFIX} - signInWithGoogle: ${typeof
|
|
13441
|
-
console.log(`${LOG_PREFIX} - signOutGoogle: ${typeof
|
|
13442
|
-
console.log(`${LOG_PREFIX} - checkGoogleSignIn: ${typeof
|
|
13443
|
-
console.log(`${LOG_PREFIX} - All keys:`, Object.keys(
|
|
13438
|
+
const authKit = window.AuthKit;
|
|
13439
|
+
if (authKit) {
|
|
13440
|
+
console.log(`${LOG_PREFIX} - signInWithGoogle: ${typeof authKit.signInWithGoogle} | descriptor:`, Object.getOwnPropertyDescriptor(authKit, 'signInWithGoogle'));
|
|
13441
|
+
console.log(`${LOG_PREFIX} - signOutGoogle: ${typeof authKit.signOutGoogle} | descriptor:`, Object.getOwnPropertyDescriptor(authKit, 'signOutGoogle'));
|
|
13442
|
+
console.log(`${LOG_PREFIX} - checkGoogleSignIn: ${typeof authKit.checkGoogleSignIn} | descriptor:`, Object.getOwnPropertyDescriptor(authKit, 'checkGoogleSignIn'));
|
|
13443
|
+
console.log(`${LOG_PREFIX} - All keys:`, Object.keys(authKit));
|
|
13444
13444
|
try {
|
|
13445
|
-
console.log(`${LOG_PREFIX} - Prototype:`, Object.getPrototypeOf(
|
|
13445
|
+
console.log(`${LOG_PREFIX} - Prototype:`, Object.getPrototypeOf(authKit));
|
|
13446
13446
|
}
|
|
13447
13447
|
catch (e) {
|
|
13448
13448
|
console.log(`${LOG_PREFIX} - Prototype: (error getting prototype)`, e);
|