dexie-cloud-addon 4.3.4 → 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.4, Fri Jan 23 2026
11
+ * Version 4.3.5, Fri Jan 23 2026
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -1597,6 +1597,25 @@ function otpFetchTokenCallback(db) {
1597
1597
  public_key,
1598
1598
  };
1599
1599
  }
1600
+ else if ((hints === null || hints === void 0 ? void 0 : hints.grant_type) === 'otp' || (hints === null || hints === void 0 ? void 0 : hints.email)) {
1601
+ // User explicitly requested OTP flow - skip provider selection
1602
+ const email = (hints === null || hints === void 0 ? void 0 : hints.email) || (yield promptForEmail(userInteraction, 'Enter email address'));
1603
+ if (/@demo.local$/.test(email)) {
1604
+ tokenRequest = {
1605
+ demo_user: email,
1606
+ grant_type: 'demo',
1607
+ scopes: ['ACCESS_DB'],
1608
+ public_key
1609
+ };
1610
+ }
1611
+ else {
1612
+ tokenRequest = {
1613
+ email,
1614
+ grant_type: 'otp',
1615
+ scopes: ['ACCESS_DB'],
1616
+ };
1617
+ }
1618
+ }
1600
1619
  else {
1601
1620
  // Check for available auth providers (OAuth + OTP)
1602
1621
  const socialAuthEnabled = ((_c = db.cloud.options) === null || _c === void 0 ? void 0 : _c.socialAuth) !== false;
@@ -6915,7 +6934,7 @@ function dexieCloud(dexie) {
6915
6934
  const syncComplete = new Subject();
6916
6935
  dexie.cloud = {
6917
6936
  // @ts-ignore
6918
- version: "4.3.4",
6937
+ version: "4.3.5",
6919
6938
  options: Object.assign({}, DEFAULT_OPTIONS),
6920
6939
  schema: null,
6921
6940
  get currentUserId() {
@@ -7294,7 +7313,7 @@ function dexieCloud(dexie) {
7294
7313
  }
7295
7314
  }
7296
7315
  // @ts-ignore
7297
- dexieCloud.version = "4.3.4";
7316
+ dexieCloud.version = "4.3.5";
7298
7317
  Dexie.Cloud = dexieCloud;
7299
7318
 
7300
7319
  export { dexieCloud as default, defineYDocTrigger, dexieCloud, getTiedObjectId, getTiedRealmId, resolveText };