datasquirel/dist/package-shared/functions/api/users/reset-password/(utils)/encrypt-url.js
Benjamin Toby 7e8bb37c09 Updates
2025-07-05 14:59:30 +01:00

17 lines
564 B
JavaScript

import EJSON from "../../../../../utils/ejson";
import encrypt from "../../../../dsql/encrypt";
export default function encryptReserPasswordUrl({ email, encryptionKey, encryptionSalt, }) {
const encryptObject = {
email,
createdAt: Date.now(),
};
const encryptStr = encrypt({
data: EJSON.stringify(encryptObject),
encryptionKey,
encryptionSalt,
});
const defaultUrlOrigin = `https://datasquirel.com`;
let urlOrigin = process.env.DSQL_HOST || defaultUrlOrigin;
const url = `${defaultUrlOrigin}`;
}