@insforge/react 0.2.8 → 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.
@@ -909,6 +909,7 @@ function SignInForm({
909
909
  );
910
910
  }
911
911
  function SignIn({
912
+ afterSignInUrl,
912
913
  onSuccess,
913
914
  onError,
914
915
  ...uiProps
@@ -948,10 +949,9 @@ function SignIn({
948
949
  try {
949
950
  setOauthLoading(provider);
950
951
  setError("");
951
- const redirectTo = `${window.location.origin}/auth/callback`;
952
952
  await insforge.auth.signInWithOAuth({
953
953
  provider,
954
- redirectTo
954
+ redirectTo: afterSignInUrl
955
955
  });
956
956
  } catch (err) {
957
957
  const errorMessage = err.message || `${provider} sign in failed`;
@@ -1130,6 +1130,7 @@ function SignUpForm({
1130
1130
  );
1131
1131
  }
1132
1132
  function SignUp({
1133
+ afterSignUpUrl,
1133
1134
  onSuccess,
1134
1135
  onError,
1135
1136
  ...uiProps
@@ -1174,10 +1175,9 @@ function SignUp({
1174
1175
  try {
1175
1176
  setOauthLoading(provider);
1176
1177
  setError("");
1177
- const redirectTo = `${window.location.origin}/auth/callback`;
1178
1178
  await insforge.auth.signInWithOAuth({
1179
1179
  provider,
1180
- redirectTo
1180
+ redirectTo: afterSignUpUrl
1181
1181
  });
1182
1182
  } catch (err) {
1183
1183
  const errorMessage = err.message || `${provider} sign up failed`;