For the full react-native-webview documentation please refer to: https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md
1. Complete our Google Form to tell us about your setup.
2. Install Flinks Connect. For more information, see Configure and Install Flinks Connect.
Add the webview=true parameter in order to send the post message directly to the react webview.
Add the demo=true to allow for Flinks Capital
This enables Flinks Capital, which you can use to test with our test users. For more information on how to test Flinks Connect using our test users, see Test Institution.
Add the redirectUrl with your own URL.
After the user is successfully connected, Flinks appends the loginId to the URL. Set up your application to save this loginId. For more information, see the following example:
https://www.example.com/flinks/connection/?loginId=******
Add the oauthWindowRedirect=true in order to allow oAuth connections to happen with full page redirection. Popups don’t work well on native applications.
Example: https://demo.flinks.com/v2/?webview=true&demo=true&oauthWindowRedirect=true&redirectUrl=https://www.example.com/flinks/connection/
3. Listen to Javascript events by adding the onMessage function to the <WebView> in your react application:
<WebView
source={{ uri: “https://demo.flinks.com/v2/?webview=true&demo=true&oauthWindowRedirect=true&redirectUrl=https://www.example.com/flinks/connection/” }}
javaScriptEnabled={true}
javaScriptCanOpenWindowsAutomatically={true}
onMessage={(event) => {this.onMessage(event.nativeEvent.data)}}
…
/>
———————
onMessage( event ) {
console.log('Debug event: ', event);
}
4. Set the following parameters on the webview:
javaScriptEnabled to TRUE
5. Configure your app to support deepLink based on your redirectUrl
https://reactnative.dev/docs/linking
6. Confirm there is successful one-way communication between the iframe and your app. For more information about what Flinks Connect emits to your app, see the following example:
Debug event: {step: 'APP_MOUNTED'}
Debug event: {step: 'COMPONENT_LOAD_INSTITUTION_SELECTOR', cached: false}
Debug event: {step: 'INSTITUTION_SELECTED', institution: 'FlinksCapital'}
Debug event: {step: 'COMPONENT_LOAD_CREDENTIAL', institution: 'FlinksCapital'}
Debug event: {step: 'SUBMIT_CREDENTIAL', institution: 'FlinksCapital'}
Debug event: {step: 'COMPONENT_LOAD_MFA', mfaTypes: Array(1), institution: 'FlinksCapital'}
Debug event: {step: 'SUBMIT_MFA', institution: 'FlinksCapital'}
Debug event: {step: 'REDIRECT', loginId: '******', requestId: '******', institution: 'FlinksCapital'}
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article