Socket
Socket
Sign inDemoInstall

@persona-js/verify

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@persona-js/verify

An unofficial Persona client to verify customers


Version published
Weekly downloads
4
decreased by-71.43%
Maintainers
1
Weekly downloads
 
Created
Source

@persona-js/verify

npm

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)

// prefilling
verificationWithPersona.prefill({ nameFirst: 'Kengo' })

// Also constructor function can accepts prefiling
newInquiry(TEMPLATE_ID, { prefill: { nameFirst: 'Kengo' } })

verificationWithPersona.start() //=> Embedded flow starts on current window
verificationWithPersona.getHostedFlowUrl() //=> Returns URL for the hosted flow

// Unsupported yet
verificationWIthPersona.on('start', () => { /* what I want to do on start inquiry flow */ })
verificationWIthPersona.on('complete', () => { /* what I want to do on complete inquiry flow */ })

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

FAQs

Package last updated on 04 May 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc