Device Fingerprinting

The React Native SDK can provide automatic bot detection and fraud prevention, provided you have configured Bot Protection and CAPTCHA in the SDK Configuration page of the Stytch dashboard. If you would like to implement our Fraud Prevention lookups on your own, you can do so by using the method below.

Methods

The SDK provides a method that can be used to retrieve a device fingerprinting telemetry ID that you can use to perform lookups from your backend server.

For more information on using the lookup endpoint, consult the fraud prevention docs.

To call this method, Bot Protection must be enabled in the SDK Configuration page of the Stytch dashboard.

GetTelemetryId

import { useStytch } from '@stytch/react-native';

export const Authenticate = () => {
  const stytchClient = useStytch();

  const login = () => {
    stytchClient.dfp.getTelemetryID()
        .then((telemetry_id) => {
            // pass the telemetry_id to your backend to perform a lookup and handle the response as appropriate
        })
        .catch(console.error);
  };

  return <button onClick={login}>Login</button>;
};

RESPONSE

026ac93b-8cdf-4fcb-bfa6-36a31cfecac1