@riskified/react-native-riskified-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

react-native-riskified-sdk

Riskified's react native wrapper for mobile SDK's

Installation

npm install @riskified/react-native-riskified-sdk

Usage

import RiskifiedSdk from '@riskified/react-native-riskified-sdk';

// On main page load
RiskifiedSdk.startBeacon(
  shopDomain: string,
  token: string,
  debug: boolean
): Promise<void>;

// On significant events and page visits
RiskifiedSdk.logRequest(
  requestUrl: string
): Promise<void>;

// If session ID updates for the user
RiskifiedSdk.updateSessionToken(
  newToken: string
): Promise<void>;

// To render OTP widget
RiskifiedSdk.renderOtpWidget(
  widgetToken: string,
  environment: 'sandbox' | 'staging' | 'production',
  debug: boolean
): Promise<string>;

// example for rendering the OTP widget
RiskifiedSdk.renderOtpWidget('token123', 'sandbox', true)
    .then((challengeAccessToken : string) => {
        // handle success verification
    })
    .catch((error) => {
        if (error.code === 'timeout') {
            // handle timeout
        } else if (error.code === 'widget_closed') {
            // handle close
        } else {
            // handle other errors
        }
    });

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.3399latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.3399
1.1.218,204
1.1.11
1.1.00
1.0.31,700
1.0.20
1.0.10
1.0.00
0.3.01
0.2.00
0.1.10
0.1.00

Package Sidebar

Install

npm i @riskified/react-native-riskified-sdk

Weekly Downloads

20,305

Version

1.1.3

License

MIT

Unpacked Size

240 MB

Total Files

2617

Last publish

Collaborators

  • bekimsina
  • gering