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';
RiskifiedSdk.startBeacon(
shopDomain: string,
token: string,
debug: boolean
): Promise<void>;
RiskifiedSdk.logRequest(
requestUrl: string
): Promise<void>;
RiskifiedSdk.updateSessionToken(
newToken: string
): Promise<void>;
RiskifiedSdk.renderOtpWidget(
widgetToken: string,
environment: 'sandbox' | 'staging' | 'production',
debug: boolean
): Promise<string>;
RiskifiedSdk.renderOtpWidget('token123', 'sandbox', true)
.then((challengeAccessToken : string) => {
})
.catch((error) => {
if (error.code === 'timeout') {
} else if (error.code === 'widget_closed') {
} else {
}
});
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