@orangecheck/auth-client 2.10.0 → 2.12.0
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/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -84,7 +84,13 @@ function OcSessionProvider({
|
|
|
84
84
|
try {
|
|
85
85
|
await fetch(`${cfg.authOrigin}${cfg.logoutPath}`, {
|
|
86
86
|
method: "POST",
|
|
87
|
-
credentials: "include"
|
|
87
|
+
credentials: "include",
|
|
88
|
+
// `keepalive` lets the logout round-trip complete even if
|
|
89
|
+
// the caller hard-navigates away in the same tick (e.g.
|
|
90
|
+
// `<OcAccountMenu>` redirects home immediately on sign-out).
|
|
91
|
+
// Without it the in-flight request is cancelled on unload
|
|
92
|
+
// and the `.ochk.io` cookie may never get cleared.
|
|
93
|
+
keepalive: true
|
|
88
94
|
});
|
|
89
95
|
} catch {
|
|
90
96
|
}
|
|
@@ -1070,13 +1076,14 @@ function LinkPromptStep({
|
|
|
1070
1076
|
authOrigin,
|
|
1071
1077
|
onResolved
|
|
1072
1078
|
}) {
|
|
1079
|
+
const what = method === "btc" ? "a Bitcoin address" : "an email";
|
|
1073
1080
|
return /* @__PURE__ */ jsxs("div", { "data-oc-linkprompt": method, children: [
|
|
1074
1081
|
/* @__PURE__ */ jsxs("div", { style: { ...panelStyle("success"), marginBottom: 16 }, children: [
|
|
1075
1082
|
/* @__PURE__ */ jsx(SectionLabel, { tone: "success", children: "\xA7 signed in" }),
|
|
1076
1083
|
/* @__PURE__ */ jsxs("p", { style: { ...bodyStyle, margin: 0 }, children: [
|
|
1077
|
-
"You
|
|
1078
|
-
|
|
1079
|
-
" \u2014
|
|
1084
|
+
"You chose to also link ",
|
|
1085
|
+
what,
|
|
1086
|
+
". Complete it below \u2014 or skip for now; it is entirely optional and changes nothing about the sign-in you just completed."
|
|
1080
1087
|
] })
|
|
1081
1088
|
] }),
|
|
1082
1089
|
method === "btc" ? /* @__PURE__ */ jsx(
|
|
@@ -1087,7 +1094,25 @@ function LinkPromptStep({
|
|
|
1087
1094
|
onDone: onResolved,
|
|
1088
1095
|
onCancel: onResolved
|
|
1089
1096
|
}
|
|
1090
|
-
) : /* @__PURE__ */ jsx(EmailLinkForm, { authOrigin, onDone: onResolved, onCancel: onResolved })
|
|
1097
|
+
) : /* @__PURE__ */ jsx(EmailLinkForm, { authOrigin, onDone: onResolved, onCancel: onResolved }),
|
|
1098
|
+
/* @__PURE__ */ jsxs(
|
|
1099
|
+
"div",
|
|
1100
|
+
{
|
|
1101
|
+
"data-oc-linkprompt-skip": "",
|
|
1102
|
+
style: { marginTop: 14, paddingTop: 14, borderTop: `1px solid ${V.border}` },
|
|
1103
|
+
children: [
|
|
1104
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: onResolved, style: ghostBtnStyle(false), children: "skip \u2014 I'll do this later" }),
|
|
1105
|
+
/* @__PURE__ */ jsxs("p", { style: { ...hintStyle, marginTop: 8 }, children: [
|
|
1106
|
+
"> ",
|
|
1107
|
+
"Changed your mind? Skipping continues you straight on \u2014 your sign-in is unaffected. You can link ",
|
|
1108
|
+
what,
|
|
1109
|
+
" anytime later from your identity page,",
|
|
1110
|
+
" ",
|
|
1111
|
+
"me.ochk.io/me/identity."
|
|
1112
|
+
] })
|
|
1113
|
+
]
|
|
1114
|
+
}
|
|
1115
|
+
)
|
|
1091
1116
|
] });
|
|
1092
1117
|
}
|
|
1093
1118
|
function EmailLinkForm({
|