Skip to main content

Documentation Index

Fetch the complete documentation index at: https://stytch.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

For a full walk-through of how to get up and running with a sign-up and login flow using Stytch, check out our Quickstart Guide.
1

Install Packages

Install the @stytch/react-native-b2b package:
npm install @stytch/react-native-b2b --save
</Step>
<Step title="Create the Stytch client">
Initialize the Stytch client, passing in your Project's `public_token` from the [Project Overview](https://stytch.com/dashboard) of the Stytch Dashboard.

```jsx
import { createStytchB2B, StytchClientConfiguration } from '@stytch/react-native-b2b';

const stytch = createStytchB2B(new StytchClientConfiguration(publicToken));
2

Wrap your application in <StytchB2BProvider>

Next, pass the Stytch client to the <StytchB2BProvider> component at the root of your application, making it accessible to all child components.
import { StytchB2BProvider } from '@stytch/react-native-b2b';
import { stytch } from './stytch';

export const App = () => {
  return (
    <StytchB2BProvider stytch={stytch}>
      {/* Your app here */}
    </StytchB2BProvider>
  );
};
3

Expo Configuration

If you are using expo, you may also need to add the following configurations:
{
  "expo": {
    "plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "packagingOptions": {
              "exclude": ["META-INF/versions/9/OSGI-INF/MANIFEST.MF"],
            },
            "ios": {
              "useFrameworks": "static",
            }
          },
        },
      ]
    ]
  }
}