Skip to content

Commit

Permalink
fix: password reset flows should allow some cases with no primary use…
Browse files Browse the repository at this point in the history
…r and ep user existing (#941)

* fix: password reset flows should allow some cases with no primary user and ep user existing

* fix: refactor based on review comments
  • Loading branch information
porcellus authored Oct 10, 2024
1 parent 0d8b577 commit 72e774f
Show file tree
Hide file tree
Showing 10 changed files with 440 additions and 308 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [20.1.5] - 2024-10-09

- Fixes an issue where users were not able to reset their password if a user with the same email address was created before account linking was enabled.
- Fixes and re-works some security checks connected to password reset.

## [20.1.4] - 2024-10-07

- Fixes an issue where revoking sessions for a specific tenant didn't work well
Expand Down
7 changes: 6 additions & 1 deletion lib/build/recipe/accountlinking/recipe.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ export default class Recipe extends RecipeModule {
recipeUserId: RecipeUserId;
userContext: UserContext;
}) => Promise<void>;
private shouldBecomePrimaryUser;
shouldBecomePrimaryUser(
user: User,
tenantId: string,
session: SessionContainerInterface | undefined,
userContext: UserContext
): Promise<boolean>;
tryLinkingByAccountInfoOrCreatePrimaryUser({
inputUser,
session,
Expand Down
351 changes: 204 additions & 147 deletions lib/build/recipe/emailpassword/api/implementation.js

Large diffs are not rendered by default.

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.

2 changes: 1 addition & 1 deletion lib/ts/recipe/accountlinking/recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ export default class Recipe extends RecipeModule {
}
};

private async shouldBecomePrimaryUser(
public async shouldBecomePrimaryUser(
user: User,
tenantId: string,
session: SessionContainerInterface | undefined,
Expand Down
371 changes: 218 additions & 153 deletions lib/ts/recipe/emailpassword/api/implementation.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/ts/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
export const version = "20.1.4";
export const version = "20.1.5";

export const cdiSupported = ["5.1"];

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "supertokens-node",
"version": "20.1.4",
"version": "20.1.5",
"description": "NodeJS driver for SuperTokens core",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 72e774f

Please sign in to comment.