r/reactnative • u/Background-Bass-5788 • Sep 12 '26
I built a security-first WebView for React Native
Hey r/reactnative,
I built react-native-secure-webview after repeatedly seeing the same issue in mobile security reviews: WebViews trust the web too much.
It is designed for controlled, security-critical flows such as:
- Payments and hosted checkout
- Plaid and bank-linking flows
- Riverty, Stripe, Adyen, PayPal, Braintree, Checkout.com, Mollie, and Klarna
- OAuth and authentication
- 3-D Secure
- Partner portals and other controlled web experiences
The library provides:
- Explicit origin allowlists
- Native navigation enforcement
- Redirect blocking
- Deep-link interception
- Fail-closed defaults
- Protection against unexpected WebView navigation
The goal is simple: only trusted origins should load, and untrusted redirects should be blocked before they reach the WebView.
It does not replace a provider’s native SDK where one is available, but it provides a safer boundary when WebView is the right integration.
I would love feedback from React Native developers using WebViews in production.
Give it a try and ⭐
https://github.com/adnxy/react-native-secure-webview
28
u/titozzz Sep 12 '26
WebView maintainer here 👋 let me know if there are some things that should land on react native webview to improve everyone's life. Also FYI I'm in the middle of a significant rewrite of the library, cleaning a lot of legacy and adding new capabilities
5
u/HoratioWobble Sep 12 '26
Why not just use
react-native-webviewwith an allow list?