@orangecheck/auth-client 2.5.0 → 2.5.1

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.mjs CHANGED
@@ -773,9 +773,9 @@ function OcSignIn({
773
773
  const safeReturn = safeReturnTo(returnTo);
774
774
  const [path, setPath] = React4.useState(initialPath);
775
775
  const handleSuccess = React4.useCallback(
776
- async (account) => {
776
+ async (account, token) => {
777
777
  if (onSuccess) {
778
- onSuccess(account);
778
+ onSuccess(account, token);
779
779
  return;
780
780
  }
781
781
  if (resolveReturnTo) {
@@ -944,7 +944,7 @@ function WalletFlow({ authOrigin, audience, onSuccess }) {
944
944
  "reason" in json && json.reason || "error" in json && json.error || `verify_failed_${res.status}`
945
945
  );
946
946
  }
947
- onSuccess(json.account);
947
+ onSuccess(json.account, json.token);
948
948
  } catch (err) {
949
949
  const msg = err instanceof Error ? err.message : "sign-in failed";
950
950
  setError(msg);
@@ -1045,7 +1045,7 @@ function EmailFlow({ authOrigin, onSuccess }) {
1045
1045
  "reason" in json && json.reason || "error" in json && json.error || `verify failed (${res.status})`
1046
1046
  );
1047
1047
  }
1048
- onSuccess(json.account);
1048
+ onSuccess(json.account, json.token);
1049
1049
  } catch (err) {
1050
1050
  setCodeError(err instanceof Error ? err.message : "verify failed");
1051
1051
  } finally {