@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 event listeners
- Resume inquriy demo
- Style polishing
- Test
- Build for CDN distribution