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.
- package/dist/modern/DexieCloudAPI.d.ts +12 -1
- package/dist/modern/dexie-cloud-addon.js +32 -3
- package/dist/modern/dexie-cloud-addon.js.map +1 -1
- package/dist/modern/dexie-cloud-addon.min.js +1 -1
- package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
- package/dist/modern/dexie-cloud-client.d.ts +1 -1
- package/dist/modern/service-worker.js +32 -3
- package/dist/modern/service-worker.js.map +1 -1
- package/dist/modern/service-worker.min.js +1 -1
- package/dist/modern/service-worker.min.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.js +33 -4
- package/dist/umd/dexie-cloud-addon.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.min.js +1 -1
- package/dist/umd/dexie-cloud-addon.min.js.map +1 -1
- package/dist/umd/service-worker.js +33 -4
- package/dist/umd/service-worker.js.map +1 -1
- package/dist/umd/service-worker.min.js +1 -1
- package/dist/umd/service-worker.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { DXCWebSocketStatus } from './DXCWebSocketStatus';
|
|
|
6
6
|
import { UserLogin } from './db/entities/UserLogin';
|
|
7
7
|
export { DexieCloudTable } from './DexieCloudTable';
|
|
8
8
|
export * from './getTiedRealmId';
|
|
9
|
-
export { DBRealm, DBRealmMember, DBRealmRole, DBSyncedObject, DBPermissionSet, } from 'dexie-cloud-common';
|
|
9
|
+
export { DBRealm, DBRealmMember, DBRealmRole, DBSyncedObject, DBPermissionSet, AuthProvidersResponse, OAuthProviderInfo, } from 'dexie-cloud-common';
|
|
10
10
|
export { resolveText } from './helpers/resolveText';
|
|
11
11
|
export { Invite } from './Invite';
|
|
12
12
|
export type { UserLogin, DXCWebSocketStatus, SyncState };
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ==========================================================================
|
|
10
10
|
*
|
|
11
|
-
* Version 4.3.
|
|
11
|
+
* Version 4.3.5, Fri Jan 23 2026
|
|
12
12
|
*
|
|
13
13
|
* https://dexie.org
|
|
14
14
|
*
|
|
@@ -3921,6 +3921,25 @@ function otpFetchTokenCallback(db) {
|
|
|
3921
3921
|
public_key,
|
|
3922
3922
|
};
|
|
3923
3923
|
}
|
|
3924
|
+
else if ((hints === null || hints === void 0 ? void 0 : hints.grant_type) === 'otp' || (hints === null || hints === void 0 ? void 0 : hints.email)) {
|
|
3925
|
+
// User explicitly requested OTP flow - skip provider selection
|
|
3926
|
+
const email = (hints === null || hints === void 0 ? void 0 : hints.email) || (yield promptForEmail(userInteraction, 'Enter email address'));
|
|
3927
|
+
if (/@demo.local$/.test(email)) {
|
|
3928
|
+
tokenRequest = {
|
|
3929
|
+
demo_user: email,
|
|
3930
|
+
grant_type: 'demo',
|
|
3931
|
+
scopes: ['ACCESS_DB'],
|
|
3932
|
+
public_key
|
|
3933
|
+
};
|
|
3934
|
+
}
|
|
3935
|
+
else {
|
|
3936
|
+
tokenRequest = {
|
|
3937
|
+
email,
|
|
3938
|
+
grant_type: 'otp',
|
|
3939
|
+
scopes: ['ACCESS_DB'],
|
|
3940
|
+
};
|
|
3941
|
+
}
|
|
3942
|
+
}
|
|
3924
3943
|
else {
|
|
3925
3944
|
// Check for available auth providers (OAuth + OTP)
|
|
3926
3945
|
const socialAuthEnabled = ((_c = db.cloud.options) === null || _c === void 0 ? void 0 : _c.socialAuth) !== false;
|
|
@@ -6744,7 +6763,7 @@ function dexieCloud(dexie) {
|
|
|
6744
6763
|
const syncComplete = new Subject();
|
|
6745
6764
|
dexie.cloud = {
|
|
6746
6765
|
// @ts-ignore
|
|
6747
|
-
version: "4.3.
|
|
6766
|
+
version: "4.3.5",
|
|
6748
6767
|
options: Object.assign({}, DEFAULT_OPTIONS),
|
|
6749
6768
|
schema: null,
|
|
6750
6769
|
get currentUserId() {
|
|
@@ -6812,6 +6831,16 @@ function dexieCloud(dexie) {
|
|
|
6812
6831
|
: yield logout(DexieCloudDB(dexie));
|
|
6813
6832
|
});
|
|
6814
6833
|
},
|
|
6834
|
+
getAuthProviders() {
|
|
6835
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6836
|
+
const options = dexie.cloud.options;
|
|
6837
|
+
if (!(options === null || options === void 0 ? void 0 : options.databaseUrl)) {
|
|
6838
|
+
throw new Error('Dexie Cloud not configured. Call db.cloud.configure() first.');
|
|
6839
|
+
}
|
|
6840
|
+
const socialAuthEnabled = options.socialAuth !== false;
|
|
6841
|
+
return fetchAuthProviders(options.databaseUrl, socialAuthEnabled);
|
|
6842
|
+
});
|
|
6843
|
+
},
|
|
6815
6844
|
sync() {
|
|
6816
6845
|
return __awaiter(this, arguments, void 0, function* ({ wait, purpose } = { wait: true, purpose: 'push' }) {
|
|
6817
6846
|
var _a;
|
|
@@ -7113,7 +7142,7 @@ function dexieCloud(dexie) {
|
|
|
7113
7142
|
}
|
|
7114
7143
|
}
|
|
7115
7144
|
// @ts-ignore
|
|
7116
|
-
dexieCloud.version = "4.3.
|
|
7145
|
+
dexieCloud.version = "4.3.5";
|
|
7117
7146
|
Dexie.Cloud = dexieCloud;
|
|
7118
7147
|
|
|
7119
7148
|
// In case the SW lives for a while, let it reuse already opened connections:
|