@persona-js/verify
A vanilla JavaScript module to run embedded/hosted flow without any dependencies, against the official npm module which has some dependencies in both internally/externally.
⚠️ This package is still in beta and missing many features of official module, so don't recommend using in production.
Install
npx i @persona-js/verify
Usage
import { newInquiry } from '@persona-js/verify'
const TEMPLATE_ID = 'tmpl_xyzxyzxyz'
const verificationWithPersona = newInquiry(TEMPLATE_ID)
verificationWithPersona.prefill({ nameFirst: 'Kengo' })
newInquiry(TEMPLATE_ID, { prefill: { nameFirst: 'Kengo' } })
verificationWithPersona.start()
verificationWithPersona.getHostedFlowUrl()
verificationWIthPersona.on('start', () => { })
verificationWIthPersona.on('complete', () => { })
License
MIT
ToDo
- Support preload embedded flow
.preload(): Promise<void>
- Support undocumented events?
- Like
verification-change
, country-select
...etc
- Support insertion?
- a11y
- Test
- Demo
- CDN ver
- Resume inquriy demo
- Popup events from embedded flow