Skip to content

Commit 97f64f3

Browse files
Merge pull request #109 from supertokens/fix/update_totp_types
feat!: rename validatorId to id
2 parents caeaec4 + bc4d95e commit 97f64f3

File tree

4 files changed

+35
-9
lines changed

4 files changed

+35
-9
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Check our [guide](https://supertokens.com/docs/thirdpartyemailpassword/common-cu
3434

3535
- Added `firstFactors` into the return type of `getLoginMethods` and removed the enabled flags of different login methods.
3636
- For older FDI versions, the firstFactors array will be calculated based on those enabled flags.
37+
- Renamed `validatorId` in claim validation errors to `id` to match the backend SDKs
3738

3839
### Migration guide
3940

@@ -81,6 +82,32 @@ async function checkLoginMethods() {
8182
}
8283
```
8384

85+
#### Renamed validatorId
86+
87+
If you used to use the `validatorId` prop of validationErrors, you should now use `id` instead.
88+
89+
Before:
90+
91+
```ts
92+
async function checkValidators() {
93+
const validationErrors = await Session.validateClaims();
94+
for (const error of validationErrors) {
95+
console.log(error.validatorId, error.reason);
96+
}
97+
}
98+
```
99+
100+
After:
101+
102+
```ts
103+
async function checkValidators() {
104+
const validationErrors = await Session.validateClaims();
105+
for (const error of validationErrors) {
106+
console.log(error.id, error.reason);
107+
}
108+
}
109+
```
110+
84111
## [0.9.1] - 2024-02-07
85112

86113
### Changes

bundle/website.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"homepage": "https://github.com/supertokens/supertokens-web-js#readme",
4141
"dependencies": {
4242
"supertokens-js-override": "0.0.4",
43-
"supertokens-website": "^18.0.0"
43+
"supertokens-website": "github:supertokens/supertokens-website#19.0"
4444
},
4545
"devDependencies": {
4646
"@babel/core": "^7.17.8",

0 commit comments

Comments
 (0)