🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

sardine-react-js-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

sardine-react-js-wrapper

React JS wrapper package to support Web SDK

1.0.11
unpublished
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

sardine-react-js-wrapper

Installation

npm install sardine-react-js-wrapper
OR
yarn add sardine-react-js-wrapper

Usage

Include sardine provider on the routes

import { SardineProvider } from 'sardine-react-js-wrapper';

const App: React.FC = () => {
  return (
    <SardineProvider>
      <Page1 />
      <Page2 />
    </SardineProvider>
  );
};

export default App;

Call SardineContext functions to setup/update/logout actions at page level

const { setupSardineWithConfig, updateSardineConfig, getSardineSessionKey  } = React.useContext(SardineContext);

// Set Up
setupSardineWithConfig({
  clientId: 'REPLACE_CLIENT_ID_SHARED_BY_SARDINE',
  customerId: 'REPLACE_CUSTOMER_ID',
  environment: 'sandbox',
  sessionKey: 'REPLACE_SESSION_KEY',
});

// Update Config
updateSardineConfig({
  customerId: 'UPDATED_CUSTOMER_ID',
  sessionKey: "UPDATED_SESSION",
  flow: "UPDATED_FLOW"
});

// Get Sardine SessionKey
getSardineSessionKey(
  (sessionKey: string) => console.log("sessionKey", sessionKey)
)

Keywords

sardine

FAQs

Package last updated on 14 Oct 2022

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