Skip to content

Commit

Permalink
Reset password now supports getDefaultValue
Browse files Browse the repository at this point in the history
  • Loading branch information
amitbadala committed Nov 6, 2023
1 parent 78cb303 commit be4c00a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
9 changes: 8 additions & 1 deletion lib/build/emailpassword-shared4.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/build/recipe/emailpassword/types.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/ts/recipe/emailpassword/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ export type ResetPasswordUsingTokenUserInput = {
/*
* enterEmailForm config.
*/
enterEmailForm?: FeatureBaseConfig;
enterEmailForm?: FeatureBaseConfig & {
getDefaultValue?: () => string;
};
};

export type NormalisedResetPasswordUsingTokenFeatureConfig = {
Expand Down
1 change: 1 addition & 0 deletions lib/ts/recipe/emailpassword/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ export function normaliseResetPasswordUsingTokenFeature(
validate: signUpEmailField.validate,
placeholder: "",
autofocus: true,
getDefaultValue: config.enterEmailForm?.getDefaultValue,
},
],
};
Expand Down

0 comments on commit be4c00a

Please sign in to comment.