Preventing users to get 403 disallowed_useragent Google error in react-native app - react-native

I've developed a react-native app which uses Auth0 to authenticate users.
I am getting a 403 disallowed_useragent error when some users try to authenticate using Google from my react-native app, using webAuth. As I searched, this is related to the browser app installed in the user device.
I can reproduce this issue using an Android 11 emulator disabling the Chrome browser, so the OS uses the WebView Browser Tester. If I let Chrome browser enabled, everything works OK.
So my question is: Is there a way to check if the browser installed in the user device supports Google Auth? So I can tell the user to update/install his browser if necessary.
I am using the official SDK react-native-auth0 v2.9.0 and react-native v0.66.0

Related

React Native: Cognito federated auth issue on Android TV

AWS Cognito Federated sign in with Google setup correctly and it works perfectly on Android devices (phones, tablets). But on Android TV Web Browsers can't redirect to custom url scheme (web browsers don't understand that the app should be opened). The error says "can't open scheme myapp://oauth/?iod=..." with the error code Net::ERR_UNKNOWN_URL_SCHEME.
React Native version is 0.66, with not the latest aws-amplify, but the issue mainly related to the behavior that browser doesn't open the app with custom url scheme.
Does anybody encountered such an issue and if yes, then what solution could be here?
Appreciate your help.
I've tried to use redirectSignIn url as App link instead of custom url scheme, but that didn't work (when you open app link from another app android opens proper app, but if redirecting/opening within the browser, then it redirects to the web page).

Electron Desktop Expo OAuth2 Login

I am building an app using Expo/React-Native for multiple platforms using OAuth2 as AuthProvider.
So far, successfully logging in on android devices, web browsers (Chrome, Edge), iOS devices.
But unfortunately, I have an issue completing logging in on electron/desktop app.
I am directed to OAuth2 server (using promptAsync from Expo Api/AuthSession)
, and successfully logging in, but not being redirected into my desktop app. Once the credentials are successfully entered on the popup dialog, the login popup dialog should redirect back to the app so I can use ‘code’ to get to access_token.
Sample project here.
How do you expo AuthSession.useAuthRequest to complete login from electron?

Branchio Universal Deeplink redirecting to safari and shows popup to launch the application even app is installed in iOS 13.3.1

Even though the Application is installed in the iPhone, tapping Branchio universal deep-link redirecting to safari and shows a popup to launch the application.
Expected: if the application is already installed, tapping deep link should launch the application.
Pre- requests:
OS: iPhone iOS 13.3.1
Release build in Appcenter
Set custom URL to https://install.appcenter.ms/app (Appcenter)
Generate the Universal deeplink
Steps to reproduce:
Generate the Universal deep-link
Using the deep-link install the application
Again Tap on the same deep-link will redirect to Safari and popup alert with CANCEL and OPEN options
Tap OPEN in safari to launch the application
This is an expected behaviour where Apple prompts the user first time if to open the app. Only if universal links are implemented, it does not ask for the second time. Our AASA validator tool (https://branch.io/resources/aasa-validator/) shows the AASA file to validated correctly but while testing on the install page of your redirected website, it is showing a 404 error. So, we are unable to replicate this on our end to check further.
Could you please share your app store link so as to help us out here.
Also, would request to check our documentation here ( https://help.branch.io/developers-hub/docs/ios-troubleshooting#section-validate-if-aasa-file-successfully-downloaded ) so as to confirm if the device is receiving the generated AASA files. This is a known issue with Apple for iOS 13.x+ where the AASA files do not get ingested into the device and causes the link redirection to show a prompt or a fail.

Expo AuthSession: WebBrowser.dismissBrowser is not available on android

Having the error running on android:
The method or property WebBrowser.dismissBrowser is not available on
android, are you sure you've linked all the native dependencies
properly?]
- node_modules/#babel/runtime/helpers/construct.js:30:26 in _construct
- node_modules/#babel/runtime/helpers/wrapNativeSuper.js:26:23 in Wrapper
- ... 19 more stack frames from framework internals
I can open a browser. Once inside the browser if I quit the browser and went back to the application, the above message show up.
I tried look at WebBrowser from expo documentation
WebBrowser.openAuthSessionAsync(url, redirectUrl)
Opens the url with Safari in a modal on iOS using SFAuthenticationSession. The user will be asked whether to allow the app to authenticate using the given url. Unavailable on Android.
What does the line mean? does that mean android don't work etc.
The user will be asked whether to allow the app to authenticate using
the given url. Unavailable on Android.

Javascript Facebook sdk - captive portal on mobile devices

We are setting up a web app which serves as a wi-fi hotspot using coova chilli and the Javascript Facebook SDK.
The app has a "login with facebook" button that, once clicked, calls the FB.login() function, which opens a pop-up window where the user can insert his credentials and log in.
This solution is working correctly in desktop browsers but it's not working in mobile devices.
These are the problems I encountered:
Android device - When I connect to the wifi network, the system prompts a notification who says "Sign in to wifi network". Once clicked, the captive page opens up correctly. But when I click the fb login button, I am redirected to the url "http://m.facebook.com/v2.8/auth ..." which is correct, but then the windows freezes and I can see only a wsod.
IOS device - same as before, the cna triggers, the redirect to the fb login page works, but once I insert my credentials, the only thing I can see is a wsod.
Both issues can be bypassed by including apple.com, google.com and other domains used for auth in the hotspot walled garden, and then the user can log in to the network by using the device's browser - Safari or Chrome, it works - as pointed out in this discussion Facebook login on Apple CNA.
The thing is, we want to make it work on the "normal" workflow, that is, to make the app work correctly within the IOS captive network assistant and the Android "sign in to wi fi" functionality.
Do you have any idea how can we solve this? We searched far and wide without any success. Thank you.
EDIT
Solved by using PHP SDK instead of javascript. By generating a login link as explained here. This works also on mobile captive portal assistants such as ios and android ones because the fb login page is opened in the same window and not in popup/iframe. I hope this helps others that may encounter the same problem.