edmaxlabs-core 2.6.8 → 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 -0
- 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 -0
- 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 */,
|