edmaxlabs-core 2.6.7 → 2.6.9
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.cjs +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +14 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -233,6 +233,20 @@ var _Authentication = class _Authentication {
|
|
|
233
233
|
});
|
|
234
234
|
return;
|
|
235
235
|
};
|
|
236
|
+
this.resetPassword = async () => {
|
|
237
|
+
const app = this.app?.getDatabase;
|
|
238
|
+
const luid = this.currentUser();
|
|
239
|
+
const payload = {
|
|
240
|
+
uid: luid?.uid,
|
|
241
|
+
ttl: 3
|
|
242
|
+
//minutes
|
|
243
|
+
};
|
|
244
|
+
const id = await app?.collection("_auth_tokens").add(payload);
|
|
245
|
+
if (id) {
|
|
246
|
+
return `https://auth.edmaxlabs.com/reset/${id}`;
|
|
247
|
+
}
|
|
248
|
+
throw new Error("Failed to request reset tokens. Try Again");
|
|
249
|
+
};
|
|
236
250
|
this.rules = async (path, context) => {
|
|
237
251
|
const res = await new HttpsRequest({
|
|
238
252
|
method: "POST" /* POST */,
|
|
@@ -869,7 +883,6 @@ var Query = class {
|
|
|
869
883
|
return [];
|
|
870
884
|
}
|
|
871
885
|
const snapshots = res.documents.map((d) => {
|
|
872
|
-
delete d.token;
|
|
873
886
|
d.id = d.id ?? d._id;
|
|
874
887
|
delete d._id;
|
|
875
888
|
return DocumentSnapshot.fromMap(d);
|
|
@@ -1118,7 +1131,6 @@ var CollectionRef = class {
|
|
|
1118
1131
|
return [];
|
|
1119
1132
|
}
|
|
1120
1133
|
return res.documents.map((d) => {
|
|
1121
|
-
delete d.token;
|
|
1122
1134
|
d.id = d.id ?? d._id;
|
|
1123
1135
|
delete d._id;
|
|
1124
1136
|
return DocumentSnapshot.fromMap(d);
|