@swype-org/react-sdk 0.1.89 → 0.1.90

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
@@ -5428,16 +5428,31 @@ function SwypePaymentInner({
5428
5428
  reportPasskeyActivity(apiBaseUrl, token, matched).catch(() => {
5429
5429
  });
5430
5430
  }
5431
- dispatch({ type: "NAVIGATE", step: "login" });
5431
+ const resolved = resolvePostAuthStep({
5432
+ hasPasskey: true,
5433
+ accounts: state.accounts,
5434
+ persistedMobileFlow: loadMobileFlowState(),
5435
+ mobileSetupInProgress: mobileSetupFlowRef.current,
5436
+ connectingNewAccount: state.connectingNewAccount
5437
+ });
5438
+ if (resolved.clearPersistedFlow) clearMobileFlowState();
5439
+ dispatch({ type: "NAVIGATE", step: resolved.step });
5432
5440
  } else {
5433
- dispatch({ type: "NAVIGATE", step: "create-passkey" });
5441
+ dispatch({
5442
+ type: "SET_ERROR",
5443
+ error: "Passkey verification was not completed. Please try again."
5444
+ });
5434
5445
  }
5435
- } catch {
5436
- dispatch({ type: "NAVIGATE", step: "create-passkey" });
5446
+ } catch (err) {
5447
+ captureException(err);
5448
+ dispatch({
5449
+ type: "SET_ERROR",
5450
+ error: err instanceof Error ? err.message : "Passkey verification failed. Please try again."
5451
+ });
5437
5452
  } finally {
5438
5453
  dispatch({ type: "SET_VERIFYING_PASSKEY", value: false });
5439
5454
  }
5440
- }, [state.knownCredentialIds, getAccessToken, apiBaseUrl]);
5455
+ }, [state.knownCredentialIds, getAccessToken, apiBaseUrl, state.accounts, state.connectingNewAccount]);
5441
5456
  const reloadAccounts = useCallback(async () => {
5442
5457
  const token = await getAccessToken();
5443
5458
  if (!token || !state.activeCredentialId) return;