@orangecheck/auth-client 2.14.0 → 2.14.1

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 CHANGED
@@ -1907,6 +1907,11 @@ function ProviderSignIn({
1907
1907
  authOrigin,
1908
1908
  returnTo
1909
1909
  }) {
1910
+ const [origin, setOrigin] = React3__namespace.useState("");
1911
+ React3__namespace.useEffect(() => {
1912
+ setOrigin(window.location.origin);
1913
+ }, []);
1914
+ const providerReturnTo = origin ? `${origin}${returnTo}` : returnTo;
1910
1915
  const line = { flex: 1, height: 1, background: "var(--border, #27272a)" };
1911
1916
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-oc-signin-providers": "", style: { marginTop: 20 }, children: [
1912
1917
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1934,7 +1939,7 @@ function ProviderSignIn({
1934
1939
  "a",
1935
1940
  {
1936
1941
  href: `${authOrigin}/api/auth/${p.id}/start?return_to=${encodeURIComponent(
1937
- returnTo
1942
+ providerReturnTo
1938
1943
  )}`,
1939
1944
  "data-oc-signin-provider": p.id,
1940
1945
  style: {