Socket
Book a DemoInstallSign in
Socket

@getyoti/share-client-core

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getyoti/share-client-core

latest
Source
npmnpm
Version
2.0.0-alpha.0
Version published
Maintainers
3
Created
Source

share-client - Core

⚠️ Are you set up with Yoti?
Please make sure you have read the quick introduction

Get started

Install the package

npm i @getyoti/share-client-core

Ready to use! Simply pass your SDK_ID, the DOM identifier of the html container, and specify the controls and options.

import { createYotiWebShare } from '@getyoti/share-client-core'

const SDK_ID = '60f98bf7-0da7-4484-aa64-5a753dd502e0'
const DOM_ID = 'share-div'

await createYotiWebShare({
  name: 'demo',
  sdkId: SDK_ID,
  domId: DOM_ID,
  flow: 'MODAL',
  hooks: {
    sessionIdResolver: () => Promise.resolve('some-session-id'),
  },
})

API

The library exposes 3 methods

import { loadClient, startYotiModalShare, startYotiInlineShare } from '../lib/main'
MethodDescription
loadClient()Utility method, loads the Yoti share client once only (automatically called by createYotiWebShare({...}))
createYotiWebShare({...})Create a Yoti WebShare instance, ready to be used
getYotiWebShareByName({...})Returns the Yoti WebShare corresponding to the name if exists
getYotiWebShareByDomId({...})Returns the Yoti WebShare corresponding to the DOM ID if exists
getDetectedDeviceType({...})Returns the device detected (currently 'desktop'/'mobile')

FAQs

Package last updated on 29 Oct 2025

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