@elvix.is/sdk 0.6.0 → 0.6.2

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/react.d.ts CHANGED
@@ -551,7 +551,9 @@ type UseUserListResult = {
551
551
  type Opts = {
552
552
  applicationId: string;
553
553
  userId: string;
554
- /** elvix origin. Defaults to "" (same-origin). */
554
+ /** elvix origin. Defaults to "https://elvix.is" the public elvix
555
+ * identity host. Override only for self-hosted elvix instances or
556
+ * dev mirrors; production consumers never need to pass this. */
555
557
  baseUrl?: string;
556
558
  /** Poll interval in ms. Default 7000. */
557
559
  pollMs?: number;
@@ -561,7 +563,9 @@ declare const useUserScopes: (opts: Opts) => UseUserListResult;
561
563
  declare const useUserMemberships: (opts: Opts) => UseUserListResult;
562
564
 
563
565
  type ElvixLifecycleWatcherProps = {
564
- /** elvix origin. Defaults to "" (same-origin). */
566
+ /** elvix origin. Defaults to "https://elvix.is" the public elvix
567
+ * identity host. Override only for self-hosted elvix instances or
568
+ * dev mirrors; production consumers never need to pass this. */
565
569
  baseUrl?: string;
566
570
  /** Poll interval in ms when SSE isn't available. Default 7000. */
567
571
  pollMs?: number;
package/dist/react.js CHANGED
@@ -1552,17 +1552,6 @@ function AuthBody({
1552
1552
  return;
1553
1553
  }
1554
1554
  if (body.next_step === "passkey") {
1555
- if (!isSameOrigin(baseUrl)) {
1556
- const redirect2 = finalRedirect(body.final ?? body.redirect);
1557
- const token2 = body.token ?? getElvixToken() ?? void 0;
1558
- onResult?.({ ok: true, redirect: redirect2, token: token2 });
1559
- if (onAuthenticated) {
1560
- onAuthenticated({ ok: true, redirect: redirect2, token: token2 });
1561
- return;
1562
- }
1563
- window.location.href = redirect2;
1564
- return;
1565
- }
1566
1555
  setBackendFinalRedirect(body.final ?? "/");
1567
1556
  setStep("passkey");
1568
1557
  return;
@@ -2620,7 +2609,7 @@ function ElvixSecuredBadge({
2620
2609
  import { useCallback as useCallback4, useEffect as useEffect5, useState as useState7 } from "react";
2621
2610
  var POLL_MS = 7e3;
2622
2611
  function useUserList(kind, opts) {
2623
- const { applicationId, baseUrl = "", pollMs = POLL_MS } = opts;
2612
+ const { applicationId, baseUrl = "https://elvix.is", pollMs = POLL_MS } = opts;
2624
2613
  const [slugs, setSlugs] = useState7([]);
2625
2614
  const [loading, setLoading] = useState7(true);
2626
2615
  const [error51, setError] = useState7(null);
@@ -2673,7 +2662,7 @@ function isSameOrigin2(baseUrl) {
2673
2662
  }
2674
2663
  }
2675
2664
  function ElvixLifecycleWatcher({
2676
- baseUrl = "",
2665
+ baseUrl = "https://elvix.is",
2677
2666
  pollMs = 7e3,
2678
2667
  applicationId,
2679
2668
  userId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvix.is/sdk",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Official elvix SDK. Drop-in React components, server helpers, and an MCP server so AI coding agents integrate elvix on the first try.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://elvix.is",