@proveanything/smartlinks-auth-ui 0.1.23 → 0.1.25

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
@@ -11501,10 +11501,13 @@ collectionId, enableContactSync, enableInteractionTracking, interactionAppId, in
11501
11501
  if (storedContactId) {
11502
11502
  setContactId(storedContactId);
11503
11503
  }
11504
+ // Set loading to false IMMEDIATELY after optimistic restore
11505
+ // Don't wait for background verification
11506
+ setIsLoading(false);
11504
11507
  console.log('[AuthContext] Session restored optimistically (pending verification)');
11505
11508
  notifyAuthStateChange('SESSION_RESTORED_OFFLINE', storedUser, storedToken.token, storedAccountData || null, null, false, null, storedContactId);
11506
11509
  }
11507
- // BACKGROUND: Verify token
11510
+ // BACKGROUND: Verify token (non-blocking)
11508
11511
  try {
11509
11512
  console.log('[AuthContext] Verifying stored token in background...');
11510
11513
  await smartlinks__namespace.auth.verifyToken(storedToken.token);
@@ -13094,7 +13097,14 @@ const AccountManagement = ({ apiEndpoint, clientId, onError, className = '', cus
13094
13097
  }, className: "auth-button button-secondary", children: "Cancel" })] })] }))] }))] }));
13095
13098
  };
13096
13099
 
13097
- const SmartlinksClaimUI = ({ apiEndpoint, clientId, clientName, collectionId, productId, proofId, onClaimSuccess, onClaimError, additionalFields = [], theme = 'light', className = '', minimal = false, proxyMode = false, customization = {}, }) => {
13100
+ const SmartlinksClaimUI = (props) => {
13101
+ // Destructure AFTER logging raw props to debug proxyMode issue
13102
+ const { apiEndpoint, clientId, clientName, collectionId, productId, proofId, onClaimSuccess, onClaimError, additionalFields = [], theme = 'light', className = '', minimal = false, proxyMode = false, customization = {}, } = props;
13103
+ // Debug logging for proxyMode - log RAW props first
13104
+ console.log('[SmartlinksClaimUI] 🔍 RAW props received:', props);
13105
+ console.log('[SmartlinksClaimUI] 🔍 props.proxyMode value:', props.proxyMode);
13106
+ console.log('[SmartlinksClaimUI] 🔍 typeof props.proxyMode:', typeof props.proxyMode);
13107
+ console.log('[SmartlinksClaimUI] 🎯 Destructured proxyMode:', proxyMode);
13098
13108
  const auth = useAuth();
13099
13109
  const [claimStep, setClaimStep] = React.useState(auth.isAuthenticated ? 'questions' : 'auth');
13100
13110
  const [claimData, setClaimData] = React.useState({});
@@ -13170,6 +13180,7 @@ const SmartlinksClaimUI = ({ apiEndpoint, clientId, clientName, collectionId, pr
13170
13180
  };
13171
13181
  // Render authentication step
13172
13182
  if (claimStep === 'auth') {
13183
+ console.log('[SmartlinksClaimUI] 🔑 Rendering auth step with proxyMode:', proxyMode);
13173
13184
  return (jsxRuntime.jsx("div", { className: className, children: jsxRuntime.jsx(SmartlinksAuthUI, { apiEndpoint: apiEndpoint, clientId: clientId, clientName: clientName, onAuthSuccess: handleAuthSuccess, onAuthError: onClaimError, theme: theme, minimal: minimal, proxyMode: proxyMode, customization: customization.authConfig }) }));
13174
13185
  }
13175
13186
  // Render additional questions step