Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@persona-js/verify
Advanced tools
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. Its bundle size is much lighter, interface is more flexible.
⚠️ This package is still in beta and missing some features of the official module and thus, still not recommended using in production.
npx i @persona-js/verify
or load CDN version on the fly. This defines window.Persona
where newInquiry
, resumeInquiry
belongs to.
<script defer src="https://unpkg.com/@persona-js/verify@x.y.z/dist/cdn.js"></script>
import { newInquiry } from '@persona-js/verify'
const verificationWithPersona = newInquiry('tmpl_xyzxyzxyz')
verificationWithPersona.start()
import { newInquiry } from '@persona-js/verify'
const verificationWithPersona = newInquiry('tmpl_xyzxyzxyz')
const url = verificationWithPersona.getHostedFlowUrl() //=> Returns URL for the hosted flow
window.open(url)
import { resumeInquiry } from `@persona-js/veerify`
const verificationWithPersona = resumeInquiry('inq_abcabcabc')
verificationWithPersona.start()
import { newInquiry } from '@persona-js/verify'
const verificationWithPersona = newInquiry('tmpl_xyzxyzxyz')
verificationWithPersona.prefill({ nameFirst: 'Kengo' })
import { newInquiry } from '@persona-js/verify'
newInquiry('tmpl_xyzxyzxyz', { prefill: { nameFirst: 'Kengo' } })
import { newInquiry } from '@persona-js/verify'
const verificationWithPersona = newInquiry('tmpl_xyzxyzxyz')
verificationWithPersona.on('start', (inquiryId) => { /* what I want to do on starting inquiry flow */ })
.prefill
, .on
is chainnableimport { newInquiry } from '@persona-js/verify'
newInquiry('tmpl_xyzxyzxyz')
.prefill({ nameLast: 'Hamasaki' })
.on('complete', (inquiryId) => { /* what I want to do on completing embedded flow */ })
.on('fail', (inquiryId) => { /* what I want to do on failing embedded flow */ })
.on('exit', () => { /* what I want to do on exiting embedded flow */ })
.start()
import { newInquiry } from '@persona-js/verify'
const verificationWithPersona = newInquiry('tmpl_xyzxyzxyz')
const preload = verificationWithPersona.preload()
...
// preload is resolved if Persona's content is ready for starting embedded flow without any wait
preload.then(() => verificationWithPersona.start())
MIT, Copyright 2021 Kengo Hamasaki k.hamasaki@gmail.com
verification-change
, country-select
...etcindex.ts
FAQs
An unofficial Persona client to verify customers
We found that @persona-js/verify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.