dexie-cloud-addon 4.3.3 → 4.3.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.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.3.3, Thu Jan 22 2026
11
+ * Version 4.3.5, Fri Jan 23 2026
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -13261,7 +13261,7 @@
13261
13261
  *
13262
13262
  * ==========================================================================
13263
13263
  *
13264
- * Version 4.2.2, Tue Jan 20 2026
13264
+ * Version 4.2.2, Fri Jan 23 2026
13265
13265
  *
13266
13266
  * https://dexie.org
13267
13267
  *
@@ -14889,6 +14889,25 @@
14889
14889
  public_key,
14890
14890
  };
14891
14891
  }
14892
+ else if ((hints === null || hints === void 0 ? void 0 : hints.grant_type) === 'otp' || (hints === null || hints === void 0 ? void 0 : hints.email)) {
14893
+ // User explicitly requested OTP flow - skip provider selection
14894
+ const email = (hints === null || hints === void 0 ? void 0 : hints.email) || (yield promptForEmail(userInteraction, 'Enter email address'));
14895
+ if (/@demo.local$/.test(email)) {
14896
+ tokenRequest = {
14897
+ demo_user: email,
14898
+ grant_type: 'demo',
14899
+ scopes: ['ACCESS_DB'],
14900
+ public_key
14901
+ };
14902
+ }
14903
+ else {
14904
+ tokenRequest = {
14905
+ email,
14906
+ grant_type: 'otp',
14907
+ scopes: ['ACCESS_DB'],
14908
+ };
14909
+ }
14910
+ }
14892
14911
  else {
14893
14912
  // Check for available auth providers (OAuth + OTP)
14894
14913
  const socialAuthEnabled = ((_c = db.cloud.options) === null || _c === void 0 ? void 0 : _c.socialAuth) !== false;
@@ -17974,7 +17993,7 @@
17974
17993
  const syncComplete = new rxjs.Subject();
17975
17994
  dexie.cloud = {
17976
17995
  // @ts-ignore
17977
- version: "4.3.3",
17996
+ version: "4.3.5",
17978
17997
  options: Object.assign({}, DEFAULT_OPTIONS),
17979
17998
  schema: null,
17980
17999
  get currentUserId() {
@@ -18042,6 +18061,16 @@
18042
18061
  : yield logout(DexieCloudDB(dexie));
18043
18062
  });
18044
18063
  },
18064
+ getAuthProviders() {
18065
+ return __awaiter(this, void 0, void 0, function* () {
18066
+ const options = dexie.cloud.options;
18067
+ if (!(options === null || options === void 0 ? void 0 : options.databaseUrl)) {
18068
+ throw new Error('Dexie Cloud not configured. Call db.cloud.configure() first.');
18069
+ }
18070
+ const socialAuthEnabled = options.socialAuth !== false;
18071
+ return fetchAuthProviders(options.databaseUrl, socialAuthEnabled);
18072
+ });
18073
+ },
18045
18074
  sync() {
18046
18075
  return __awaiter(this, arguments, void 0, function* ({ wait, purpose } = { wait: true, purpose: 'push' }) {
18047
18076
  var _a;
@@ -18343,7 +18372,7 @@
18343
18372
  }
18344
18373
  }
18345
18374
  // @ts-ignore
18346
- dexieCloud.version = "4.3.3";
18375
+ dexieCloud.version = "4.3.5";
18347
18376
  Dexie.Cloud = dexieCloud;
18348
18377
 
18349
18378
  // In case the SW lives for a while, let it reuse already opened connections: