@ory/elements-react 1.0.0-next.13 → 1.0.0-next.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## 1.0.0-next.14 (2024-11-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🚀 Features
|
|
5
|
+
|
|
6
|
+
- force OIDC account selection on settings
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### 🩹 Fixes
|
|
10
|
+
|
|
11
|
+
- redirect to login if session expired during settings
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ❤️ Thank You
|
|
15
|
+
|
|
16
|
+
- Jonas Hungershausen
|
|
17
|
+
|
|
1
18
|
## 1.0.0-next.13 (2024-11-05)
|
|
2
19
|
|
|
3
20
|
|
package/dist/index.js
CHANGED
|
@@ -2582,7 +2582,17 @@ async function onSubmitSettings({ config, flow }, {
|
|
|
2582
2582
|
},
|
|
2583
2583
|
onRedirect
|
|
2584
2584
|
})
|
|
2585
|
-
)
|
|
2585
|
+
).catch((err) => {
|
|
2586
|
+
if (clientFetch.isResponseError(err)) {
|
|
2587
|
+
if (err.response.status === 401) {
|
|
2588
|
+
return onRedirect(
|
|
2589
|
+
clientFetch.loginUrl(config) + "?return_to=" + clientFetch.settingsUrl(config),
|
|
2590
|
+
true
|
|
2591
|
+
);
|
|
2592
|
+
}
|
|
2593
|
+
throw err;
|
|
2594
|
+
}
|
|
2595
|
+
});
|
|
2586
2596
|
}
|
|
2587
2597
|
function OryForm({ children, onAfterSubmit, nodes }) {
|
|
2588
2598
|
var _a;
|
|
@@ -2666,8 +2676,10 @@ function OryForm({ children, onAfterSubmit, nodes }) {
|
|
|
2666
2676
|
if ("lookup_secret_confirm" in submitData || "lookup_secret_reveal" in submitData || "lookup_secret_regenerate" in submitData) {
|
|
2667
2677
|
submitData.method = "lookup_secret";
|
|
2668
2678
|
}
|
|
2669
|
-
if (
|
|
2670
|
-
submitData.
|
|
2679
|
+
if (submitData.method === "oidc") {
|
|
2680
|
+
submitData.upstream_parameters = {
|
|
2681
|
+
prompt: "select_account"
|
|
2682
|
+
};
|
|
2671
2683
|
}
|
|
2672
2684
|
if ("webauthn_remove" in submitData) {
|
|
2673
2685
|
submitData.method = "webauthn";
|