This repository has been archived on 2023-05-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
auth/lib/utils/links.ts
mifi 5fba4c6643
Some checks failed
continuous-integration/drone/push Build is failing
Linty fresh and pretty
2023-05-02 20:54:14 -04:00

8 lines
366 B
TypeScript

import { API_PATH, PORT, RESET_ROUTE } from '../constants/defaults';
export const getPasswordResetLink = (token: string) => {
const hostname = process.env.HOST_NAME || `localhost:${process.env.PORT || PORT}`;
const path = `${process.env.API_PATH || API_PATH}${process.env.RESET_ROUTE || RESET_ROUTE}`;
return `https://${hostname}${path}?t=${token}`;
};