React Native integration
Adding Saakuru Mobile Wallet SDK to your React Native project
Adding Saakuru Mobile Wallet SDK to your React Native project
Step 1: Installing dependency
npm i react-native-metaone-wallet-sdk -s
or yarn add react-native-metaone-wallet-sdk
Step 2: Adding Saakuru Mobile SDK
Android
Add the following config to your "local.properties" file inside the Android directory:
Add the following code to your build.gradle file:
iOS
coming soon
Step 3: Initializing SDK
Initialize Saakuru Mobile SDK:
await initialize();
Check session status:
await getSessionActivityStatus();
Step 4: Creating a User Session
To successfully initialize a user session, your back-end integration has to be ready first. Your backend should receive an Authorization token during the initialization request.
Initialize the session by calling: logInWithSSO(token);
Your session is initialized. You can now use all other functions that require Authorization
Call setupUserData();
to initialize user profile data before allowing him to proceed further
Important:
To ensure a good user experience, we recommend you implement:
Initialize user session during initial auth
Refresh the user session when the session expires.
Last updated