rn-sid-address-verification
Version:
A SourceID address verification package for react native
82 lines (53 loc) • 1.89 kB
Markdown
React Native package for SID Address Verification with location tracking capabilities.
```sh
npm install rn-sid-address-verification
```
Or visit our [npm page](https://www.npmjs.com/package/rn-sid-address-verification)
Run pod install:
```sh
cd ios && pod install
```
```js
import {
startTrackingWithConfig,
fetchConfiguration,
pickLocation
} from 'rn-sid-address-verification';
// Fetch configuration
const config = await fetchConfiguration('api-key', 'customerID', 'verificationGroupID');
console.log('Configuration:', config);
// Start tracking
startTrackingWithConfig('api-key', 'customerID', 'verificationGroupID');
console.log('Tracking started:', success);
//Pick location manually from map
async function pickManualLocation() {
try {
const result = await pickLocation();
setLocation(
`${result.address}\n\nLat: ${result.latitude}\nLng: ${result.longitude}`
);
} catch (error) {
setLocation('Error picking location');
}
}
```
Fetches configuration from the server.
Starts location tracking with the provided configuration.
Lets the user pick location from the map
- [Development workflow](CONTRIBUTING.md
- [Sending a pull request](CONTRIBUTING.md
- [Code of conduct](CODE_OF_CONDUCT.md)
MIT
---
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)