@proveanything/smartlinks-auth-ui 0.1.13 → 0.1.14

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.js CHANGED
@@ -11449,9 +11449,9 @@ const AuthProvider = ({ children, proxyMode = false, accountCacheTTL = 5 * 60 *
11449
11449
  setAccountData(authAccountData || null);
11450
11450
  // Cross-iframe auth state synchronization
11451
11451
  // Always notify parent frame of login (both modes, but especially important in proxy mode)
11452
- const sdk = smartlinks__namespace;
11453
- if (sdk.iframe?.isIframe?.()) {
11454
- sdk.iframe.sendParentCustom('smartlinks:authkit:login', {
11452
+ if (smartlinks.iframe.isIframe()) {
11453
+ console.log('[AuthContext] Notifying parent of login via postMessage');
11454
+ smartlinks.iframe.sendParentCustom('smartlinks:authkit:login', {
11455
11455
  token: authToken,
11456
11456
  user: authUser,
11457
11457
  accountData: authAccountData || null
@@ -11484,9 +11484,9 @@ const AuthProvider = ({ children, proxyMode = false, accountCacheTTL = 5 * 60 *
11484
11484
  setAccountInfo(null);
11485
11485
  // Cross-iframe auth state synchronization
11486
11486
  // Always notify parent frame of logout
11487
- const sdk = smartlinks__namespace;
11488
- if (sdk.iframe?.isIframe?.()) {
11489
- sdk.iframe.sendParentCustom('smartlinks:authkit:logout', {});
11487
+ if (smartlinks.iframe.isIframe()) {
11488
+ console.log('[AuthContext] Notifying parent of logout via postMessage');
11489
+ smartlinks.iframe.sendParentCustom('smartlinks:authkit:logout', {});
11490
11490
  }
11491
11491
  notifyAuthStateChange('LOGOUT', null, null, null);
11492
11492
  }