Skip to content

Commit 47b1add

Browse files
Bump changelog and some test related fixes
1 parent d40bab5 commit 47b1add

File tree

12 files changed

+50
-28
lines changed

12 files changed

+50
-28
lines changed

CHANGELOG.md

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

88
## [unreleased]
99

10+
## [0.49.0] - 2025-03-12
11+
12+
- Adds webauthn recipe with passkey, webauthn-platform, and webauthn-resident support
13+
- Adds new pre-built UI components for passkey
14+
- Adds new colors to the palette
15+
- `--palette-caution`: Used for showing cautionary messages
16+
- `--palette-errorDark`: Used for showing error messages with a darker shade
17+
1018
## [0.48.0] - 2024-10-07
1119

1220
### Fixes

examples/for-tests-react-16/src/App.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ function getWebauthnConfigs({
894894
throwWebauthnError,
895895
webauthnErrorStatus,
896896
webauthnRecoverAccountErrorStatus,
897-
disableWebauthnSupport,
897+
overrideWebauthnSupport,
898898
}) {
899899
return Webauthn.init({
900900
style: `
@@ -1061,15 +1061,21 @@ function getWebauthnConfigs({
10611061
return implementation.recoverAccount(...args);
10621062
},
10631063
doesBrowserSupportWebAuthn(...args) {
1064-
if (disableWebauthnSupport) {
1065-
return {
1066-
status: "OK",
1067-
browserSupportsWebAuthn: false,
1068-
platformAuthenticatorIsAvailable: false,
1069-
};
1064+
if (overrideWebauthnSupport === undefined) {
1065+
return implementation.doesBrowserSupportWebAuthn(...args);
1066+
}
1067+
1068+
// The value is defined but not set to true would mean
1069+
// it is a stringifiedJSON value.
1070+
if (overrideWebauthnSupport !== "true") {
1071+
return JSON.parse(overrideWebauthnSupport);
10701072
}
10711073

1072-
return implementation.doesBrowserSupportWebAuthn(...args);
1074+
return {
1075+
status: "OK",
1076+
browserSupportsWebAuthn: false,
1077+
platformAuthenticatorIsAvailable: false,
1078+
};
10731079
},
10741080
};
10751081
},

examples/for-tests-react-16/src/testContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function getTestContext() {
2727
throwWebauthnError: localStorage.getItem("throwWebauthnError") === "true",
2828
webauthnErrorStatus: localStorage.getItem("webauthnErrorStatus") || undefined,
2929
webauthnRecoverAccountErrorStatus: localStorage.getItem("webauthnRecoverAccountErrorStatus") || undefined,
30-
disableWebauthnSupport: localStorage.getItem("disableWebauthnSupport") === "true",
30+
overrideWebauthnSupport: localStorage.getItem("overrideWebauthnSupport"),
3131
};
3232
return ret;
3333
}

examples/for-tests/src/App.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ function getWebauthnConfigs({
11561156
throwWebauthnError,
11571157
webauthnErrorStatus,
11581158
webauthnRecoverAccountErrorStatus,
1159-
disableWebauthnSupport,
1159+
overrideWebauthnSupport,
11601160
}) {
11611161
return Webauthn.init({
11621162
override: {
@@ -1323,15 +1323,23 @@ function getWebauthnConfigs({
13231323
return implementation.recoverAccount(...args);
13241324
},
13251325
doesBrowserSupportWebAuthn(...args) {
1326-
if (disableWebauthnSupport) {
1327-
return {
1328-
status: "OK",
1329-
browserSupportsWebAuthn: false,
1330-
platformAuthenticatorIsAvailable: false,
1331-
};
1326+
if (overrideWebauthnSupport === undefined) {
1327+
return implementation.doesBrowserSupportWebAuthn(...args);
1328+
}
1329+
1330+
// The value is defined but not set to true would mean
1331+
// it is a stringifiedJSON value.
1332+
if (overrideWebauthnSupport !== "true") {
1333+
return JSON.parse(overrideWebauthnSupport);
13321334
}
13331335

1334-
return implementation.doesBrowserSupportWebAuthn(...args);
1336+
// Value is defined and set to `true` so we will return
1337+
// the default values.
1338+
return {
1339+
status: "OK",
1340+
browserSupportsWebAuthn: false,
1341+
platformAuthenticatorIsAvailable: false,
1342+
};
13351343
},
13361344
};
13371345
},

examples/for-tests/src/testContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function getTestContext() {
2828
throwWebauthnError: localStorage.getItem("throwWebauthnError") === "true",
2929
webauthnErrorStatus: localStorage.getItem("webauthnErrorStatus") || undefined,
3030
webauthnRecoverAccountErrorStatus: localStorage.getItem("webauthnRecoverAccountErrorStatus") || undefined,
31-
disableWebauthnSupport: localStorage.getItem("disableWebauthnSupport") === "true",
31+
overrideWebauthnSupport: localStorage.getItem("overrideWebauthnSupport"),
3232
};
3333
return ret;
3434
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"_comment": "contains a list of frontend-backend interface versions that this package supports",
3-
"versions": ["3.1", "4.0"]
3+
"versions": ["3.1", "4.0", "4.1"]
44
}

lib/build/genericComponentOverrideContext.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.

lib/build/version.d.ts

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

lib/ts/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
* License for the specific language governing permissions and limitations
1313
* under the License.
1414
*/
15-
export const package_version = "0.48.1";
15+
export const package_version = "0.49.0";

package-lock.json

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

0 commit comments

Comments
 (0)