@insforge/sdk 1.3.0-ssr.3 → 1.3.0

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.mjs CHANGED
@@ -2601,10 +2601,11 @@ function createClient(config = {}) {
2601
2601
  return new InsForgeClient(config);
2602
2602
  }
2603
2603
  function createAdminClient(config) {
2604
- if (!config?.apiKey) {
2604
+ const { apiKey: rawApiKey, ...clientConfig } = config ?? {};
2605
+ const apiKey = rawApiKey?.trim();
2606
+ if (!apiKey) {
2605
2607
  throw new Error("Missing apiKey. Pass apiKey to createAdminClient().");
2606
2608
  }
2607
- const { apiKey, ...clientConfig } = config;
2608
2609
  return new InsForgeClient({
2609
2610
  ...clientConfig,
2610
2611
  edgeFunctionToken: apiKey,