Skip to content

Commit

Permalink
fix: missed param
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Jul 7, 2023
1 parent 2450c61 commit 706177f
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/build/recipe/emailpassword/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function validateAndNormaliseUserInput(recipeInstance, appInfo, config) {
: _a.service;
/**
* following code is for backward compatibility.
* if user has not passed emailDelivery config, we use the default
* if user has not passed emailService config, we use the default
* createAndSendEmailUsingSupertokensService implementation which calls our supertokens API
*/
if (emailService === undefined) {
Expand Down
2 changes: 1 addition & 1 deletion lib/build/recipe/emailverification/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function validateAndNormaliseUserInput(_, appInfo, config) {
let emailService = (_a = config.emailDelivery) === null || _a === void 0 ? void 0 : _a.service;
/**
* following code is for backward compatibility.
* if user has not passed emailDelivery config, we use the default
* if user has not passed emailService config, we use the default
* createAndSendEmailUsingSupertokensService implementation which calls our supertokens API
*/
if (emailService === undefined) {
Expand Down
2 changes: 1 addition & 1 deletion lib/build/recipe/passwordless/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function validateAndNormaliseUserInput(_, appInfo, config) {
let emailService = (_a = config.emailDelivery) === null || _a === void 0 ? void 0 : _a.service;
/**
* following code is for backward compatibility.
* if user has not passed emailDelivery config, we use the default
* if user has not passed emailService config, we use the default
* createAndSendEmailUsingSupertokensService implementation
*/
if (emailService === undefined) {
Expand Down
1 change: 1 addition & 0 deletions lib/build/recipe/thirdpartyemailpassword/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export default class Wrapper {
password?: string;
userContext?: any;
applyPasswordPolicy?: boolean;
tenantIdForPasswordPolicy?: string;
}): Promise<
| {
status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR";
Expand Down
11 changes: 8 additions & 3 deletions lib/build/recipe/thirdpartyemailpassword/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,14 @@ class Wrapper {
});
}
static updateEmailOrPassword(input) {
return recipe_1.default
.getInstanceOrThrowError()
.recipeInterfaceImpl.updateEmailOrPassword(Object.assign({ userContext: {} }, input));
return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.updateEmailOrPassword(
Object.assign(Object.assign({ userContext: {} }, input), {
tenantIdForPasswordPolicy:
input.tenantIdForPasswordPolicy === undefined
? constants_1.DEFAULT_TENANT_ID
: input.tenantIdForPasswordPolicy,
})
);
}
static createResetPasswordLink(userId, tenantId, userContext) {
return __awaiter(this, void 0, void 0, function* () {
Expand Down
1 change: 1 addition & 0 deletions lib/build/recipe/thirdpartyemailpassword/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export declare type RecipeInterface = {
password?: string;
userContext: any;
applyPasswordPolicy?: boolean;
tenantIdForPasswordPolicy: string;
}): Promise<
| {
status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR";
Expand Down
2 changes: 1 addition & 1 deletion lib/build/recipe/thirdpartyemailpassword/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function validateAndNormaliseUserInput(recipeInstance, appInfo, config) {
: _a.service;
/**
* following code is for backward compatibility.
* if user has not passed emailDelivery config, we use the default
* if user has not passed emailService config, we use the default
* createAndSendEmailUsingSupertokensService implementation
*/
if (emailService === undefined) {
Expand Down
2 changes: 1 addition & 1 deletion lib/build/recipe/thirdpartypasswordless/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function validateAndNormaliseUserInput(appInfo, config) {
: _a.service;
/**
* following code is for backward compatibility.
* if user has not passed emailDelivery config, we use the default
* if user has not passed emailService config, we use the default
* createAndSendEmailUsingSupertokensService implementation
*/
if (emailService === undefined) {
Expand Down
3 changes: 3 additions & 0 deletions lib/ts/recipe/thirdpartyemailpassword/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,13 @@ export default class Wrapper {
password?: string;
userContext?: any;
applyPasswordPolicy?: boolean;
tenantIdForPasswordPolicy?: string;
}) {
return Recipe.getInstanceOrThrowError().recipeInterfaceImpl.updateEmailOrPassword({
userContext: {},
...input,
tenantIdForPasswordPolicy:
input.tenantIdForPasswordPolicy === undefined ? DEFAULT_TENANT_ID : input.tenantIdForPasswordPolicy,
});
}

Expand Down
1 change: 1 addition & 0 deletions lib/ts/recipe/thirdpartyemailpassword/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export type RecipeInterface = {
password?: string;
userContext: any;
applyPasswordPolicy?: boolean;
tenantIdForPasswordPolicy: string;
}): Promise<
| {
status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR";
Expand Down

0 comments on commit 706177f

Please sign in to comment.