I want to integrate a website into a webview with react native.
Everything is fine until I want to login with facebook. When I press the "Login With Facebook" button, the webview become just a white screen and it is blocked.
This happens because when I press the login button, it tries to open a popup, but the popups are not enabled in react native webview.
So, my question is: how is possible to enable popups in webview? I just want my website to behave just like in a normal browser (like chrome, where everything is working fine), but inside my webview.
I use react native 0.55.
I read https://codeburst.io/webviews-and-social-authentication-with-react-native-cfecf96ac7d7 but didn't help me because I don't have access to the website source code.
Related
is there any way to redirect to our react native app when user clicks an existing app (example: if a user clicks facebook app it should redirect to our react native app)?
You can open your app depending upon some url. However, user has to click the link. Otherwise no, unless the "other app" is written by you!
I need to download pdf from the site I opened with webView. When I try this the application closes. Is there any way to do this? Do I need to add permission.
I am using expo. What I do is connect to a site with the webView. When you press the download button on the site it downloads base64 as pdf. I can do this on the Internet. I did it in Chrome. However, I could not do it in the mobile application. How can I do that. When I click the button, the application closes. I’m getting this warning on the console Can’t open url: data:application/pdf;base64,JVBERi0xLjQKJeLjz9MKNCAwIG9iag… I can view but not download
I use react-native-simple-auth in my project but i can login twitter in web.I want to login with twitter app instead of safari view in react native. How to do this? Any Idea?
If you have installed Twitter in the phone use this:
Linking.openURL('twitter://app')
This is the snippet that open an external app. It open but you can't pass params to log in. Only open the app and, if you are logged, you will automatically enter to the app logged, else, just will open Login view.
My project includes the firebase sign-in methods: Twitter, Facebook, Google and Github.
I am using firebase.auth().signInWithPopup() to handle authentication and callback. It works fine when run in the browser:
in mobile, this is different. I realize that it opens a new safari window, but it does not redirect to the app home screen. How can we do that?
this is the project in the firebase console for the Facebook sign-in
I believe this is a known issue for home screen apps in iOS. The window that is opened is sandboxed from the home screen app. The popup is unable to pass back the result to the parent home screen app. Instead, you should use signInWithRedirect in that mode. I believe that should work.
I am struggling with this issue for a while right now. I have an in-app browser, where I direct user to some webpage. In this webpage, there are popups, that are not working on in the WebView - they are not opening. I was trying to intercept them with onNavigationStateChange prop, and tried to navigate user to his native browser, but I've failed to do so - the popups never trigger any callbacks in the onNavigationStateChange. I was testing this using this webpage. My question boils down to:
Is is possible to intercept popups in the WebView, and if not - what approach can I take to make the popups available in the WebView or to somehow redirect user to his native browser, whenever the popup happens?