dfp.getTelemetryID generates a telemetry ID for the user for use in the Fingerprint Lookup API. import { Text, TouchableOpacity, View } from 'react-native';
import { useStytchB2BClient } from '@stytch/react-native/b2b';
export const Authenticate = () => {
const stytch = useStytchB2BClient();
const login = () => {
stytch.dfp
.getTelemetryID()
.then(({ telemetryId }) => {
// pass the telemetry_id to your backend to perform a lookup and handle the response as appropriate
console.log(telemetryId);
})
.catch(console.error);
};
return (
<View>
<TouchableOpacity onPress={login}>
<Text>Login</Text>
</TouchableOpacity>
</View>
);
};
{
"telemetryId": "026ac93b-8cdf-4fcb-bfa6-36a31cfecac1"
}
import { Text, TouchableOpacity, View } from 'react-native';
import { useStytchB2BClient } from '@stytch/react-native/b2b';
export const Authenticate = () => {
const stytch = useStytchB2BClient();
const login = () => {
stytch.dfp
.getTelemetryID()
.then(({ telemetryId }) => {
// pass the telemetry_id to your backend to perform a lookup and handle the response as appropriate
console.log(telemetryId);
})
.catch(console.error);
};
return (
<View>
<TouchableOpacity onPress={login}>
<Text>Login</Text>
</TouchableOpacity>
</View>
);
};
{
"telemetryId": "026ac93b-8cdf-4fcb-bfa6-36a31cfecac1"
}
Get the Device Fingerprinting telemetry ID for the device using the Stytch React Native SDK
import { Text, TouchableOpacity, View } from 'react-native';
import { useStytchB2BClient } from '@stytch/react-native/b2b';
export const Authenticate = () => {
const stytch = useStytchB2BClient();
const login = () => {
stytch.dfp
.getTelemetryID()
.then(({ telemetryId }) => {
// pass the telemetry_id to your backend to perform a lookup and handle the response as appropriate
console.log(telemetryId);
})
.catch(console.error);
};
return (
<View>
<TouchableOpacity onPress={login}>
<Text>Login</Text>
</TouchableOpacity>
</View>
);
};
{
"telemetryId": "026ac93b-8cdf-4fcb-bfa6-36a31cfecac1"
}
dfp.getTelemetryID generates a telemetry ID for the user for use in the Fingerprint Lookup API.