@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.
package/dist/index.js
CHANGED
|
@@ -6690,7 +6690,8 @@ const PasskeymeCallbackHandler = ({ loadingComponent: LoadingComponent, errorCom
|
|
|
6690
6690
|
setTimeout(async () => {
|
|
6691
6691
|
const currentUser = state.authenticatedUser || user;
|
|
6692
6692
|
if (onSuccess && currentUser) {
|
|
6693
|
-
//
|
|
6693
|
+
// For custom callbacks, execute immediately without URL cleanup
|
|
6694
|
+
// The parent component should handle navigation after the callback
|
|
6694
6695
|
try {
|
|
6695
6696
|
const token = await auth.getAccessToken();
|
|
6696
6697
|
onSuccess(currentUser, token || "");
|
|
@@ -6701,7 +6702,7 @@ const PasskeymeCallbackHandler = ({ loadingComponent: LoadingComponent, errorCom
|
|
|
6701
6702
|
}
|
|
6702
6703
|
}
|
|
6703
6704
|
else {
|
|
6704
|
-
//
|
|
6705
|
+
// For redirects, clean URL before navigating away
|
|
6705
6706
|
window.history.replaceState({}, document.title, window.location.pathname);
|
|
6706
6707
|
window.location.href = successRedirect;
|
|
6707
6708
|
}
|