The latest version of the SDK is:
We are continually releasing fixes and updates which improve the end user experience. We recommend staying up-to-date with releases to make sure you are taking advantage of the latest functionality and improvements.
eventsAllowlist parameter to control which events are forwarded to the onEvent callback. Pass 'all' to receive all events, or an array of specific event names. See Client Callbacks.onEvent events: step-transitioned, click, and form-update (requires eventsAllowlist).customHostrole=dialog to iframe modal and address accessibility issuehost option. This option is not needed for most use cases.InquiryError as a named type export for TypeScript usersInquiry as a named export in persona-react for ESM userswidgetPadding as a param. This parameter allows controlling the widget paddings for the inline flow, to allow for more flexible layouts.Client.preload(), which allows preloading static JavaScript assets ahead of time to speed up subsequent load timesthe Inquiry export of this package (used for the Inline React integration) has been moved to a separate package persona-react, and has been removed from this package. To migrate, change import { Inquiry } from 'persona' to import Inquiry from 'persona-react'.
The following features marked as deprecated in persona@4.0.0 (released 2021-08-03) have been removed.
prefill (replaced by the fields parameter)lockedAttributes (replaced by the fields parameter + template-level configuration)themeId (only used by legacy inquiries)InquiryAttributes type export (only used by legacy inquiries)InquiryErrorInvalidInquiryId type (was never actually used)onStart. The onEvent callback can be used as a replacement by listening for Event.Start.onComplete signature changed to use keyword arguments inquiryId, status, and field. statusshould be inspected to determine if the inquiry passed or failed.fieldsis the same as the previous second argument.onFailcallback removed;onComplete` will be called instead.onExit, client.exit() renamed onCancel, client.cancel(). This is to make it more clear that onExit is not called when closing the flow after the flow has been completed.onLoad and onReady callbacks, passes them to the new onError instead.accessToken renamed to sessionToken. templates.note removed. Use custom fields instead.persona-verify, but inquiries created via Inquiry Templates will no longer send the following events: 'country-select', 'verification-change'. There are no replacements.message listenerallow-top-navigation-by-user-activationallow-top-navigation-by-user-activation