@orangecheck/auth-client 2.4.0 → 2.5.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.mjs CHANGED
@@ -762,6 +762,7 @@ function OcSignIn({
762
762
  audience,
763
763
  returnTo,
764
764
  onSuccess,
765
+ resolveReturnTo,
765
766
  authOrigin = "https://ochk.io",
766
767
  initialPath = "wallet",
767
768
  paths,
@@ -772,14 +773,22 @@ function OcSignIn({
772
773
  const safeReturn = safeReturnTo(returnTo);
773
774
  const [path, setPath] = React4.useState(initialPath);
774
775
  const handleSuccess = React4.useCallback(
775
- (account) => {
776
+ async (account) => {
776
777
  if (onSuccess) {
777
778
  onSuccess(account);
778
779
  return;
779
780
  }
781
+ if (resolveReturnTo) {
782
+ try {
783
+ const target = await resolveReturnTo(account);
784
+ hardNavigate(safeReturnTo(target));
785
+ return;
786
+ } catch {
787
+ }
788
+ }
780
789
  hardNavigate(safeReturn);
781
790
  },
782
- [onSuccess, safeReturn]
791
+ [onSuccess, resolveReturnTo, safeReturn]
783
792
  );
784
793
  if (!walletEnabled && !emailEnabled) {
785
794
  return /* @__PURE__ */ jsxs(
@@ -903,10 +912,7 @@ function WalletFlow({ authOrigin, audience, onSuccess }) {
903
912
  }
904
913
  let adapter;
905
914
  try {
906
- const moduleId = "@orangecheck/wallet-adapter";
907
- adapter = await Function("m", "return import(m)")(
908
- moduleId
909
- );
915
+ adapter = await import('@orangecheck/wallet-adapter');
910
916
  } catch {
911
917
  throw new Error(
912
918
  "@orangecheck/wallet-adapter not installed \xB7 add it to your consumer site"
@@ -1193,7 +1199,10 @@ var inputStyle = {
1193
1199
  border: "1px solid var(--input, #27272a)",
1194
1200
  borderRadius: 6,
1195
1201
  fontFamily: "ui-monospace, SFMono-Regular, monospace",
1196
- fontSize: 13,
1202
+ // 16px — never below it. A sub-16px font-size makes iOS Safari
1203
+ // auto-zoom the viewport on focus; the family rule is >=16px on
1204
+ // every form field. Desktop reads fine at 16 too.
1205
+ fontSize: 16,
1197
1206
  outline: "none"
1198
1207
  };
1199
1208
  function submitStyle(disabled) {