Skip to content

Commit 03ae129

Browse files
committed
fix: review fixes
1 parent 0ab304a commit 03ae129

File tree

10 files changed

+76
-105
lines changed

10 files changed

+76
-105
lines changed

CHANGELOG.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10-
- Refactor the AccountLinking recipe to be automatically nitialized on SuperKokens init
11-
- Upgrade typedoc and the reference docs
12-
- Add a method for verifying if a recipe is initialized or not
13-
- Added register credential endpoint for the WebAuthn recipe
14-
15-
## [23.0.0] - 2025-06-27
10+
## [23.0.0] - 2025-07-21
1611

1712
### Breaking changes
1813

1914
- The `getConsentRequest`, `acceptConsentRequest`, `rejectConsentRequest`, `acceptLoginRequest`, `rejectLoginRequest` and `introspectToken` can now possibly return an `ErrorOAuth2`.
2015
- The `/oauth/introspect` can now possibly return an `ErrorAuth2`.
2116
- Removed default defaultMaxAge from all built-in claims/validators. You can optionally set them when adding the validators. This should help with unexpected API calls during session verification.
17+
- Added register credential endpoint for the WebAuthn recipe
2218

23-
### Refactors
19+
### Refactors/Internal changes
2420

2521
- Refactors querier to use dynamic request body and response body types inference.
2622
- Refactor internal network calls made with querier to use the new dynamic types.
2723
- The `User` class now has a `fromApi` function to normalize the user object returned from the API.
2824
- Added experimental support for plugins. Please note that the experimental nature of this feature means that we might break the interface in non-major version updates.
25+
- Refactor the AccountLinking recipe to be automatically initialized on SuperTokens init instead during the first call
26+
- Upgrade typedoc and the reference docs
27+
- Add a method for verifying if a recipe is initialized or not
2928

3029
## [22.1.1] - 2025-06-20
3130

lib/build/recipe/webauthn/api/implementation.js

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/recipe/webauthn/api/listCredentials.js

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/recipe/webauthn/api/removeCredential.js

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ts/recipe/passwordless/api/implementation.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default function getAPIImplementation(): APIInterface {
7070
linkCode: input.linkCode,
7171
tenantId: input.tenantId,
7272
userContext: input.userContext,
73-
},
73+
}
7474
);
7575
}
7676

@@ -111,7 +111,7 @@ export default function getAPIImplementation(): APIInterface {
111111
}
112112

113113
const loginMethod = sessionUser.loginMethods.find(
114-
(lm) => lm.recipeUserId.getAsString() === input.session!.getRecipeUserId().getAsString(),
114+
(lm) => lm.recipeUserId.getAsString() === input.session!.getRecipeUserId().getAsString()
115115
);
116116
if (loginMethod === undefined) {
117117
throw new SessionError({
@@ -187,7 +187,7 @@ export default function getAPIImplementation(): APIInterface {
187187
return AuthUtils.getErrorStatusResponseWithReason(
188188
preAuthChecks,
189189
errorCodeMap,
190-
"SIGN_IN_UP_NOT_ALLOWED",
190+
"SIGN_IN_UP_NOT_ALLOWED"
191191
);
192192
}
193193

@@ -218,7 +218,7 @@ export default function getAPIImplementation(): APIInterface {
218218
shouldTryLinkingWithSessionUser: input.shouldTryLinkingWithSessionUser,
219219
tenantId: input.tenantId,
220220
userContext: input.userContext,
221-
},
221+
}
222222
);
223223

224224
if (
@@ -254,7 +254,7 @@ export default function getAPIImplementation(): APIInterface {
254254
return AuthUtils.getErrorStatusResponseWithReason(
255255
postAuthChecks,
256256
errorCodeMap,
257-
"SIGN_IN_UP_NOT_ALLOWED",
257+
"SIGN_IN_UP_NOT_ALLOWED"
258258
);
259259
}
260260

@@ -298,11 +298,11 @@ export default function getAPIImplementation(): APIInterface {
298298
factorIds = getEnabledPwlessFactors(input.options.config);
299299
if (accountInfo.email !== undefined) {
300300
factorIds = factorIds.filter((factor) =>
301-
[FactorIds.OTP_EMAIL, FactorIds.LINK_EMAIL].includes(factor),
301+
[FactorIds.OTP_EMAIL, FactorIds.LINK_EMAIL].includes(factor)
302302
);
303303
} else {
304304
factorIds = factorIds.filter((factor) =>
305-
[FactorIds.OTP_PHONE, FactorIds.LINK_PHONE].includes(factor),
305+
[FactorIds.OTP_PHONE, FactorIds.LINK_PHONE].includes(factor)
306306
);
307307
}
308308
}
@@ -330,7 +330,7 @@ export default function getAPIImplementation(): APIInterface {
330330
return AuthUtils.getErrorStatusResponseWithReason(
331331
preAuthChecks,
332332
errorCodeMap,
333-
"SIGN_IN_UP_NOT_ALLOWED",
333+
"SIGN_IN_UP_NOT_ALLOWED"
334334
);
335335
}
336336

@@ -344,7 +344,7 @@ export default function getAPIImplementation(): APIInterface {
344344
? undefined
345345
: await input.options.config.getCustomUserInputCode(
346346
input.tenantId,
347-
input.userContext,
347+
input.userContext
348348
),
349349
session: input.session,
350350
shouldTryLinkingWithSessionUser: input.shouldTryLinkingWithSessionUser,
@@ -358,12 +358,12 @@ export default function getAPIImplementation(): APIInterface {
358358
? undefined
359359
: await input.options.config.getCustomUserInputCode(
360360
input.tenantId,
361-
input.userContext,
361+
input.userContext
362362
),
363363
session: input.session,
364364
shouldTryLinkingWithSessionUser: input.shouldTryLinkingWithSessionUser,
365365
tenantId: input.tenantId,
366-
},
366+
}
367367
);
368368

369369
if (response.status !== "OK") {
@@ -454,7 +454,7 @@ export default function getAPIImplementation(): APIInterface {
454454
userContext: input.userContext,
455455
});
456456
const userExists = users.some((u) =>
457-
u.loginMethods.some((lm) => lm.recipeId === "passwordless" && lm.hasSameEmailAs(input.email)),
457+
u.loginMethods.some((lm) => lm.recipeId === "passwordless" && lm.hasSameEmailAs(input.email))
458458
);
459459

460460
return {
@@ -470,7 +470,7 @@ export default function getAPIImplementation(): APIInterface {
470470
// tenantId: input.tenantId,
471471
},
472472
false,
473-
input.userContext,
473+
input.userContext
474474
);
475475

476476
return {
@@ -513,7 +513,7 @@ export default function getAPIImplementation(): APIInterface {
513513
},
514514
userWithMatchingLoginMethod?.user,
515515
true,
516-
input.userContext,
516+
input.userContext
517517
);
518518

519519
if (authTypeInfo.status === "LINKING_TO_SESSION_USER_FAILED") {
@@ -574,7 +574,7 @@ export default function getAPIImplementation(): APIInterface {
574574
factorIds,
575575
input.tenantId,
576576
false,
577-
input.userContext,
577+
input.userContext
578578
);
579579
}
580580

@@ -667,8 +667,8 @@ async function getPasswordlessUserByAccountInfo(input: {
667667
});
668668
logDebugMessage(
669669
`getPasswordlessUserByAccountInfo got ${existingUsers.length} from core resp ${JSON.stringify(
670-
input.accountInfo,
671-
)}`,
670+
input.accountInfo
671+
)}`
672672
);
673673
const usersWithMatchingLoginMethods = existingUsers
674674
.map((user) => ({
@@ -677,17 +677,17 @@ async function getPasswordlessUserByAccountInfo(input: {
677677
(lm) =>
678678
lm.recipeId === "passwordless" &&
679679
(lm.hasSameEmailAs(input.accountInfo.email) ||
680-
lm.hasSamePhoneNumberAs(input.accountInfo.phoneNumber)),
680+
lm.hasSamePhoneNumberAs(input.accountInfo.phoneNumber))
681681
)!,
682682
}))
683683
.filter(({ loginMethod }) => loginMethod !== undefined);
684684

685685
logDebugMessage(
686-
`getPasswordlessUserByAccountInfo ${usersWithMatchingLoginMethods.length} has matching login methods`,
686+
`getPasswordlessUserByAccountInfo ${usersWithMatchingLoginMethods.length} has matching login methods`
687687
);
688688
if (usersWithMatchingLoginMethods.length > 1) {
689689
throw new Error(
690-
"This should never happen: multiple users exist matching the accountInfo in passwordless createCode",
690+
"This should never happen: multiple users exist matching the accountInfo in passwordless createCode"
691691
);
692692
}
693693
return usersWithMatchingLoginMethods[0];

0 commit comments

Comments
 (0)