Prerequisites
- Node.js version
18.xor higher - React version
18.xor higher - A package manager:
npmoryarn
1. Install the SDK
Run one of the following commands depending on your package manager:Next Steps
SDK Setup
2. Import the SDK
Then, import the SDK client in your project:3. Initialize the React App Provider with your project ID
Finally, wrap your application’s root component with OfflineAppProvider and pass in your project id. This project id is required for authenticating all requests made to the Offline Protocol Identity Service. Once initialized, you can access SDK functionality anywhere in your app using the provided hooks.4. Verify Your Setup
Test your SDK configuration with a simple API call:5. Implement User Authentication
Now let’s add authentication to your application using theloginWithModal function.
Use the useAuth hook to access the loginWithModal function: