
Security News
VulnCon 2025: NVD Scraps Industry Consortium Plan, Raising Questions About Reform
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
connect-react-native-sdk
Advanced tools
Mastercard Open Banking Connect React Native SDK provides an easy way for developers to integrate Mastercard Open Banking Connect into their React Native application.
The Connect React Native SDK supports following android and iOS version.
WARNING: The redirectUrl property, supporting universal links on android, app links on iOS, and deeplinks, is available from Connect React Native SDK version 2.0.0 onward.
The Connect React Native SDK has the following peerDependencies
:
If you application doesn't use react-native-inappbrowser-reborn
and react-native-webview
as dependencies. Install using following documentation
Note: Recommended versions with which its tested is react-native-inappbrowser-reborn: 3.7.0 and react-native-webview: 13.6.3
Using npm
npm install connect-react-native-sdk
Using yarn
yarn add connect-react-native-sdk
Note: Connect React native sdk only react native versions above 0.64, Linking the package manually is not required anymore with Autolinking.
iOS Platform:
CocoaPods on iOS needs this extra step
$ cd ios && pod install && cd ..
The Connect React Native SDK requires internet access to connect with our servers. As such, you need to add internet permissions to the AndroidManifest.xml file.
<uses-permission android:name="android.permission.INTERNET">
Props | Description |
---|---|
connectUrl (required) | The SDK loads the Connect URL. |
eventHandlers (required) | An Object implementing the ConnectEventHandlers methods. |
redirectUrl (optional) | App link URL/ Deep link URL to redirect back to your mobile app after completing FI’s OAuth flow. This parameter is only required for App to App. |
See Generate 2.0 Connect URL APIs for connectUrl
generation
import {
Connect,
ConnectEventHandlers,
} from 'connect-react-native-sdk';
const MyConnectComponent = () => {
const eventHandlers: ConnectEventHandlers = {
onDone: (event: ConnectDoneEvent) => {},
onCancel: (event: ConnectCancelEvent) => {},
onError: (event: ConnectErrorEvent) => {},
onRoute: (event: ConnectRouteEvent) => {},
onUser: (event: any) => {},
onLoad: () => {},
};
return (
<Connect
connectUrl={'#GENERATED_CONNECT_URL#'}
eventHandlers={eventHandlers}
redirectUrl={'#UNIVERSAL_LINK_FOR_APP_TO_APP_AUTHENTICATION#}
/>
);
};
Throughout Connect’s flow, events about the state of the web application are sent as Json objects to the eventHandlers
prop.
NOTE: The onUser event handler will not return anything unless you’re specifically targeting Connect.
export interface ConnectEventHandlers {
onDone: (event: ConnectDoneEvent) => void;
onCancel: (event: ConnectCancelEvent) => void;
onError: (event: ConnectErrorEvent) => void;
onRoute?: (event: ConnectRouteEvent) => void;
onUser?: (event: any) => void;
onLoad?: () => void;
}
Callback Events See here for details on the events via their callback interface.
Note: The onDone, onError, onRoute, and onUser callback functions will have a JSONObject parameter that contains data about the event. Visit Connect Events for information
To provide the best app to app authentication experience for your customers, you should send a universal link URL in the redirect URL parameter when using Connect. See App To App Authentication for more details.
Before installing the Connect React Native SDK for use with app to app authentication, complete the following
For information on how to create a Universal Links to be used as redirectUrl in your application, see Apple's Allowing apps and websites to link to your content for details.
NOTE In order to provide the best app to app authentication customer experience, Partners should use a universal link as a redirectUrl.
It is not recommended to create deep links (custom URL schemes) as redirectUrl since they lack the security of Universal Links through the two-way association between your app and your website. A deep link will also trigger an alert on iOS devices that can add friction to the customer experience, requesting permission to redirect back to the Partner's app.
Any application can register custom URL schemes and there is no further validation from iOS. If multiple applications have registered the same custom URL scheme, a different application may be launched each time the URL is opened. To complete OAuth flows, it is important that your application is opened and not any arbitrary application that has registered the same URL scheme.
For information on how to create a App Links as redirectUrl in your application, see adding Android App Links for details.
NOTE:
In order to provide the best app to app authentication customer experience, Partners should use a app link as a redirectUrl.
It is not recommended to create deep links (custom URL schemes) as redirectUrl since they lack the security of App Links through the two-way association between your app and your website.
Any application can register custom URL schemes and there is no further validation from Android. If multiple applications have registered the same custom URL scheme, a different application may be launched each time the URL is opened. To complete OAuth flows, it is important that your application is opened and not any arbitrary application that has registered the same URL scheme.
In order to return control back to your application after a customer completes a FI's OAuth flow, you must specify a redirectUrl
value, which will be the URL from which Connect will be re-launched for a customer to complete the Connect experience.
Here is an example of a universal link redirectUrl within your code:
<Connect
connectUrl={'#GENERATED_CONNECT_URL#'}
eventHandlers={eventHandlers}
redirectUrl={'https://yourdomain.com/mastercardConnect'}
/>
For information on how to configure your server see supporting associated domains
Version | Compatibility |
---|---|
1.x | React 16+, React Native >=0.63 |
2.x | React 16+, React Native >=0.63 |
FAQs
React Native SDK for Mastercard Open Banking Connect
We found that connect-react-native-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.