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

📦 NEW: #101 Allow password reset token to be passed when calling submitNewPassword function #107

Open
wants to merge 7 commits into
base: 0.10
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.9.2] - 2024-03-07

- Added support to pass password reset token while calling the submitNewPassword function

## [0.10.0] - 2024-03-03

### Overview
Expand Down
2 changes: 1 addition & 1 deletion bundle/emailpassword.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/emailverification.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/multifactorauth.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/multitenancy.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/passwordless.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/supertokens.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/thirdparty.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/thirdpartyemailpassword.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/thirdpartypasswordless.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/totp.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/build/recipe/emailpassword/index.d.ts

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

11 changes: 7 additions & 4 deletions lib/build/recipe/emailpassword/recipeImplementation.js

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

1 change: 1 addition & 0 deletions lib/build/recipe/emailpassword/types.d.ts

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

1 change: 1 addition & 0 deletions lib/build/recipe/thirdpartyemailpassword/index.d.ts

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

1 change: 1 addition & 0 deletions lib/build/recipe/thirdpartyemailpassword/types.d.ts

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

2 changes: 1 addition & 1 deletion lib/build/version.d.ts

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

2 changes: 1 addition & 1 deletion lib/build/version.js

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

1 change: 1 addition & 0 deletions lib/ts/recipe/emailpassword/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default class RecipeWrapper {
}[];
options?: RecipeFunctionOptions;
userContext?: any;
passwordToken?: string;
}): Promise<
| {
status: "OK";
Expand Down
10 changes: 7 additions & 3 deletions lib/ts/recipe/emailpassword/recipeImplementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ export default function getRecipeImplementation(
formFields,
options,
userContext,
passwordToken,
}: {
formFields: {
id: string;
value: string;
}[];
options?: RecipeFunctionOptions;
userContext: any;
passwordToken?: string;
}): Promise<
| {
status: "OK";
Expand All @@ -55,9 +57,11 @@ export default function getRecipeImplementation(
}
> {
const tenantId = this.getTenantIdFromURL({ userContext });
const token = this.getResetPasswordTokenFromURL({
userContext,
});
const token =
passwordToken ||
this.getResetPasswordTokenFromURL({
userContext,
});

const { jsonBody, fetchResponse } = await querier.post<
| {
Expand Down
1 change: 1 addition & 0 deletions lib/ts/recipe/emailpassword/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export type RecipeInterface = {
}[];
options?: RecipeFunctionOptions;
userContext: any;
passwordToken?: string;
}) => Promise<
| {
souvik666 marked this conversation as resolved.
Show resolved Hide resolved
status: "OK";
Expand Down
1 change: 1 addition & 0 deletions lib/ts/recipe/thirdpartyemailpassword/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default class RecipeWrapper {
}[];
options?: RecipeFunctionOptions;
userContext?: any;
passwordToken?: string;
}): Promise<
| {
status: "OK";
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 @@ -81,6 +81,7 @@ export type RecipeInterface = {
}[];
options?: RecipeFunctionOptions;
userContext: any;
passwordToken?: string;
}) => Promise<
| {
status: "OK";
Expand Down
2 changes: 1 addition & 1 deletion lib/ts/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
export const package_version = "0.10.0";
export const package_version = "0.9.2";

export const supported_fdi = ["1.17", "1.18", "1.19"];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "supertokens-web-js",
"version": "0.10.0",
"version": "0.9.2",
"description": "SuperTokens SDK for vanilla JS for all recipes",
"main": "./index.js",
"scripts": {
Expand Down