@passkeyme/react-auth 2.2.4 → 2.2.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"PasskeymeCallbackHandler.d.ts","sourceRoot":"","sources":["../../src/components/PasskeymeCallbackHandler.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAuLzD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,GAAG,GAAG,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,wBAAwB,GAAI,sIAQtC,6BAA6B,mDAs3B/B,CAAC"}
1
+ {"version":3,"file":"PasskeymeCallbackHandler.d.ts","sourceRoot":"","sources":["../../src/components/PasskeymeCallbackHandler.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAuLzD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,GAAG,GAAG,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,wBAAwB,GAAI,sIAQtC,6BAA6B,mDAu3B/B,CAAC"}
package/dist/index.esm.js CHANGED
@@ -6689,7 +6689,8 @@ const PasskeymeCallbackHandler = ({ loadingComponent: LoadingComponent, errorCom
6689
6689
  setTimeout(async () => {
6690
6690
  const currentUser = state.authenticatedUser || user;
6691
6691
  if (onSuccess && currentUser) {
6692
- // Use auth's getAccessToken method instead of direct localStorage access
6692
+ // For custom callbacks, execute immediately without URL cleanup
6693
+ // The parent component should handle navigation after the callback
6693
6694
  try {
6694
6695
  const token = await auth.getAccessToken();
6695
6696
  onSuccess(currentUser, token || "");
@@ -6700,7 +6701,7 @@ const PasskeymeCallbackHandler = ({ loadingComponent: LoadingComponent, errorCom
6700
6701
  }
6701
6702
  }
6702
6703
  else {
6703
- // Clean URL and redirect to success page
6704
+ // For redirects, clean URL before navigating away
6704
6705
  window.history.replaceState({}, document.title, window.location.pathname);
6705
6706
  window.location.href = successRedirect;
6706
6707
  }