@insforge/react 0.2.7 → 0.2.9

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
@@ -1262,6 +1262,7 @@ function SignInForm({
1262
1262
  );
1263
1263
  }
1264
1264
  function SignIn({
1265
+ afterSignInUrl,
1265
1266
  onSuccess,
1266
1267
  onError,
1267
1268
  ...uiProps
@@ -1301,10 +1302,9 @@ function SignIn({
1301
1302
  try {
1302
1303
  setOauthLoading(provider);
1303
1304
  setError("");
1304
- const redirectTo = `${window.location.origin}/auth/callback`;
1305
1305
  await insforge.auth.signInWithOAuth({
1306
1306
  provider,
1307
- redirectTo
1307
+ redirectTo: afterSignInUrl
1308
1308
  });
1309
1309
  } catch (err) {
1310
1310
  const errorMessage = err.message || `${provider} sign in failed`;
@@ -1483,6 +1483,7 @@ function SignUpForm({
1483
1483
  );
1484
1484
  }
1485
1485
  function SignUp({
1486
+ afterSignUpUrl,
1486
1487
  onSuccess,
1487
1488
  onError,
1488
1489
  ...uiProps
@@ -1527,10 +1528,9 @@ function SignUp({
1527
1528
  try {
1528
1529
  setOauthLoading(provider);
1529
1530
  setError("");
1530
- const redirectTo = `${window.location.origin}/auth/callback`;
1531
1531
  await insforge.auth.signInWithOAuth({
1532
1532
  provider,
1533
- redirectTo
1533
+ redirectTo: afterSignUpUrl
1534
1534
  });
1535
1535
  } catch (err) {
1536
1536
  const errorMessage = err.message || `${provider} sign up failed`;