Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add tenant id into password reset links #695

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/build/recipe/emailpassword/api/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const __1 = require("../../../");
const recipe_1 = __importDefault(require("../../accountlinking/recipe"));
const recipe_2 = __importDefault(require("../../emailverification/recipe"));
const recipeUserId_1 = __importDefault(require("../../../recipeUserId"));
const utils_1 = require("../utils");
function getAPIImplementation() {
return {
emailExistsGET: async function ({ email, tenantId }) {
Expand Down Expand Up @@ -57,13 +58,12 @@ function getAPIImplementation() {
status: "OK",
};
}
let passwordResetLink =
options.appInfo.websiteDomain.getAsStringDangerous() +
options.appInfo.websiteBasePath.getAsStringDangerous() +
"/reset-password?token=" +
response.token +
"&rid=" +
options.recipeId;
let passwordResetLink = utils_1.getPasswordResetLink({
appInfo: options.appInfo,
token: response.token,
recipeId: options.recipeId,
tenantId,
});
logger_1.logDebugMessage(`Sending password reset email to ${email}`);
await options.emailDelivery.ingredientInterfaceImpl.sendEmail({
tenantId,
Expand Down
14 changes: 7 additions & 7 deletions lib/ts/recipe/emailpassword/api/implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import AccountLinking from "../../accountlinking/recipe";
import EmailVerification from "../../emailverification/recipe";
import { RecipeLevelUser } from "../../accountlinking/types";
import RecipeUserId from "../../../recipeUserId";
import { getPasswordResetLink } from "../utils";

export default function getAPIImplementation(): APIInterface {
return {
Expand Down Expand Up @@ -100,13 +101,12 @@ export default function getAPIImplementation(): APIInterface {
};
}

let passwordResetLink =
options.appInfo.websiteDomain.getAsStringDangerous() +
options.appInfo.websiteBasePath.getAsStringDangerous() +
"/reset-password?token=" +
response.token +
"&rid=" +
options.recipeId;
let passwordResetLink = getPasswordResetLink({
appInfo: options.appInfo,
token: response.token,
recipeId: options.recipeId,
tenantId,
});

logDebugMessage(`Sending password reset email to ${email}`);
await options.emailDelivery.ingredientInterfaceImpl.sendEmail({
Expand Down
Loading