1.0.4 • Published 1 year ago

@humansecurity/expo-mobile-sdk v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

expo-mobile-sdk

A model implementing our native SDK's with the expo framework.

API documentation

Installation in managed Expo projects -

From the terminal run:

npm install @humansecurity/expo-mobile-sdk
npx expo prebuild

Usage example

import { HumanSecurity } from '@humansecurity/expo-mobile-sdk';

//Display the version text in a tag to confirm integration:
<ThemedText type="title">{HumanSecurity.sdkVersion()}</ThemedText> 

The full Documentation and usage examples can be found at our official site.

The current API:

  sdkVersion(): string;
  startWithAppId(appId: string, policy?: HSPolicy): Promise<void>;
  startWithAppIds(appIds: string[], policy?: HSPolicy): Promise<void>;
  vid(appId: string): string | null;

  // BD functionality
  headersForURLRequest(appId?: string): { [key: string]: string };
  handleResponse(response: string, code: number, url: string): Promise<HSBotDefenderChallengeResult>;
  canHandleResponse(response: string, code: number, url: string): boolean;
  challengeReferenceId(): string;
  setCustomParameters(parameters: { [key: string]: string }, appId?: string): void;

  // Adding AD functions
  setUserId(userId: string | null, appId?: string): void;
  registerOutgoingUrlRequest(url: string, appId?: string): void;
  setAdditionalData(parameters: { [key: string]: string }, appId?: string): void;

Installation in bare React Native projects

For the react-native bare workflow projects see our integration guide.

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago