@passkeyme/react-auth 2.2.5 → 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,
|
|
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
|
@@ -6686,12 +6686,11 @@ const PasskeymeCallbackHandler = ({ loadingComponent: LoadingComponent, errorCom
|
|
|
6686
6686
|
};
|
|
6687
6687
|
// Proceed with redirect after auth completion
|
|
6688
6688
|
const proceedWithRedirect = async () => {
|
|
6689
|
-
// Clean URL immediately to prevent effect re-run with stale URL params
|
|
6690
|
-
window.history.replaceState({}, document.title, window.location.pathname);
|
|
6691
6689
|
setTimeout(async () => {
|
|
6692
6690
|
const currentUser = state.authenticatedUser || user;
|
|
6693
6691
|
if (onSuccess && currentUser) {
|
|
6694
|
-
//
|
|
6692
|
+
// For custom callbacks, execute immediately without URL cleanup
|
|
6693
|
+
// The parent component should handle navigation after the callback
|
|
6695
6694
|
try {
|
|
6696
6695
|
const token = await auth.getAccessToken();
|
|
6697
6696
|
onSuccess(currentUser, token || "");
|
|
@@ -6702,7 +6701,8 @@ const PasskeymeCallbackHandler = ({ loadingComponent: LoadingComponent, errorCom
|
|
|
6702
6701
|
}
|
|
6703
6702
|
}
|
|
6704
6703
|
else {
|
|
6705
|
-
//
|
|
6704
|
+
// For redirects, clean URL before navigating away
|
|
6705
|
+
window.history.replaceState({}, document.title, window.location.pathname);
|
|
6706
6706
|
window.location.href = successRedirect;
|
|
6707
6707
|
}
|
|
6708
6708
|
}, 100);
|