@proveanything/smartlinks-auth-ui 0.4.10 → 0.4.11

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 CHANGED
@@ -12651,7 +12651,9 @@ const WHITELISTED_GOOGLE_OAUTH_HOSTS = [
12651
12651
  ];
12652
12652
  /**
12653
12653
  * Check if the current domain is whitelisted for direct Google OAuth.
12654
- * Uses exact hostname match (plus subdomain match for smartlinks.app production).
12654
+ * Uses EXACT hostname match only subdomains (e.g. hubdev.smartlinks.app)
12655
+ * are NOT auto-whitelisted because they're not registered with Google Cloud Console.
12656
+ * Unregistered domains must route through the Google OAuth proxy.
12655
12657
  * Merges the hardcoded list with any additional domains from auth kit config.
12656
12658
  * Returns true if OneTap/inline flow can work without a proxy.
12657
12659
  */
@@ -12660,7 +12662,7 @@ const isWhitelistedGoogleDomain = (additionalDomains) => {
12660
12662
  const allDomains = additionalDomains?.length
12661
12663
  ? [...WHITELISTED_GOOGLE_OAUTH_HOSTS, ...additionalDomains]
12662
12664
  : WHITELISTED_GOOGLE_OAUTH_HOSTS;
12663
- return allDomains.some(domain => hostname === domain || hostname.endsWith(`.${domain}`));
12665
+ return allDomains.some(domain => hostname === domain);
12664
12666
  };
12665
12667
  // Default auth UI configuration when no clientId is provided
12666
12668
  const DEFAULT_AUTH_CONFIG = {