@blinkdotnew/sdk 0.18.4 → 0.18.5

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.d.mts CHANGED
@@ -832,6 +832,10 @@ declare class BlinkAuth {
832
832
  private getStorageKey;
833
833
  /**
834
834
  * Migrate existing global tokens to project-scoped storage
835
+ * DISABLED: We don't migrate global blink_tokens anymore because:
836
+ * 1. Platform uses blink_tokens for platform auth (different user)
837
+ * 2. Migrating platform tokens would cause project to show wrong user
838
+ * 3. Projects should always authenticate fresh via their own flow
835
839
  */
836
840
  private migrateExistingTokens;
837
841
  /**
package/dist/index.d.ts CHANGED
@@ -832,6 +832,10 @@ declare class BlinkAuth {
832
832
  private getStorageKey;
833
833
  /**
834
834
  * Migrate existing global tokens to project-scoped storage
835
+ * DISABLED: We don't migrate global blink_tokens anymore because:
836
+ * 1. Platform uses blink_tokens for platform auth (different user)
837
+ * 2. Migrating platform tokens would cause project to show wrong user
838
+ * 3. Projects should always authenticate fresh via their own flow
835
839
  */
836
840
  private migrateExistingTokens;
837
841
  /**
package/dist/index.js CHANGED
@@ -957,16 +957,12 @@ var BlinkAuth = class {
957
957
  }
958
958
  /**
959
959
  * Migrate existing global tokens to project-scoped storage
960
+ * DISABLED: We don't migrate global blink_tokens anymore because:
961
+ * 1. Platform uses blink_tokens for platform auth (different user)
962
+ * 2. Migrating platform tokens would cause project to show wrong user
963
+ * 3. Projects should always authenticate fresh via their own flow
960
964
  */
961
965
  migrateExistingTokens() {
962
- if (typeof window === "undefined") return;
963
- const oldTokens = localStorage.getItem("blink_tokens");
964
- const projectKey = this.getStorageKey("tokens");
965
- if (oldTokens && !localStorage.getItem(projectKey)) {
966
- localStorage.setItem(projectKey, oldTokens);
967
- localStorage.removeItem("blink_tokens");
968
- console.log(`\u2705 Migrated tokens to project scope: ${this.config.projectId}`);
969
- }
970
966
  }
971
967
  /**
972
968
  * Wait for authentication initialization to complete
package/dist/index.mjs CHANGED
@@ -955,16 +955,12 @@ var BlinkAuth = class {
955
955
  }
956
956
  /**
957
957
  * Migrate existing global tokens to project-scoped storage
958
+ * DISABLED: We don't migrate global blink_tokens anymore because:
959
+ * 1. Platform uses blink_tokens for platform auth (different user)
960
+ * 2. Migrating platform tokens would cause project to show wrong user
961
+ * 3. Projects should always authenticate fresh via their own flow
958
962
  */
959
963
  migrateExistingTokens() {
960
- if (typeof window === "undefined") return;
961
- const oldTokens = localStorage.getItem("blink_tokens");
962
- const projectKey = this.getStorageKey("tokens");
963
- if (oldTokens && !localStorage.getItem(projectKey)) {
964
- localStorage.setItem(projectKey, oldTokens);
965
- localStorage.removeItem("blink_tokens");
966
- console.log(`\u2705 Migrated tokens to project scope: ${this.config.projectId}`);
967
- }
968
964
  }
969
965
  /**
970
966
  * Wait for authentication initialization to complete
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blinkdotnew/sdk",
3
- "version": "0.18.4",
3
+ "version": "0.18.5",
4
4
  "description": "Blink TypeScript SDK for client-side applications - Zero-boilerplate CRUD + auth + AI + analytics + notifications for modern SaaS/AI apps",
5
5
  "keywords": [
6
6
  "blink",