@insforge/react 1.1.6-test.2 → 1.1.7-dev.0
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/atoms.cjs.map +1 -1
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +11 -2
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +11 -2
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js.map +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.d.cts +0 -6
- package/dist/lib.d.ts +0 -6
- package/dist/lib.js.map +1 -1
- package/package.json +114 -114
package/dist/components.cjs
CHANGED
|
@@ -3649,6 +3649,11 @@ function SignInForm({
|
|
|
3649
3649
|
}
|
|
3650
3650
|
|
|
3651
3651
|
// src/lib/hosted-auth.ts
|
|
3652
|
+
function getCsrfTokenFromCookie() {
|
|
3653
|
+
if (typeof document === "undefined") return null;
|
|
3654
|
+
const match2 = document.cookie.match(/(?:^|;\s*)insforge_csrf_token=([^;]*)/);
|
|
3655
|
+
return match2 ? decodeURIComponent(match2[1]) : null;
|
|
3656
|
+
}
|
|
3652
3657
|
function isHostedAuthEnvironment() {
|
|
3653
3658
|
if (typeof window === "undefined") {
|
|
3654
3659
|
return false;
|
|
@@ -3699,11 +3704,13 @@ function SignIn({ onError, ...uiProps }) {
|
|
|
3699
3704
|
isHandlingOAuthRedirectRef.current = false;
|
|
3700
3705
|
return;
|
|
3701
3706
|
}
|
|
3707
|
+
const csrfToken = getCsrfTokenFromCookie();
|
|
3702
3708
|
const legacyUrl = buildLegacyAuthUrl(redirectUrl, {
|
|
3703
3709
|
accessToken: session.accessToken,
|
|
3704
3710
|
userId: session.user.id,
|
|
3705
3711
|
email: session.user.email,
|
|
3706
|
-
name: session.user.profile?.name || ""
|
|
3712
|
+
name: session.user.profile?.name || "",
|
|
3713
|
+
csrfToken: csrfToken || void 0
|
|
3707
3714
|
});
|
|
3708
3715
|
window.location.href = legacyUrl;
|
|
3709
3716
|
} catch (err) {
|
|
@@ -3951,11 +3958,13 @@ function SignUp({ onError, emailRedirectTo, ...uiProps }) {
|
|
|
3951
3958
|
isHandlingOAuthRedirectRef.current = false;
|
|
3952
3959
|
return;
|
|
3953
3960
|
}
|
|
3961
|
+
const csrfToken = getCsrfTokenFromCookie();
|
|
3954
3962
|
const legacyUrl = buildLegacyAuthUrl(redirectUrl, {
|
|
3955
3963
|
accessToken: session.accessToken,
|
|
3956
3964
|
userId: session.user.id,
|
|
3957
3965
|
email: session.user.email,
|
|
3958
|
-
name: session.user.profile?.name || ""
|
|
3966
|
+
name: session.user.profile?.name || "",
|
|
3967
|
+
csrfToken: csrfToken || void 0
|
|
3959
3968
|
});
|
|
3960
3969
|
window.location.href = legacyUrl;
|
|
3961
3970
|
} catch (err) {
|