Android WebView doesn't allow authentication with the @solid/react library due to a popup

331 Views Asked by At

I've been working in the development of a webapp that uses Solid to store information of the users such as the list of friends. In order to authenticate into the app, we are using the @solid/react library that generates a popup in which you can login and continue to use the app. That works perfectly. The problem appeared when we decided to make an android app with a webview that would reflect the webapp. At first, the webview wouldn't open the popup, so I decided to try something like this:

``` 
myWebView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {

                view.loadUrl(url);

                return true;
            }
        });
´´´

With that, I achieved to open the popup in the webview, but it would appear this error as it would lose connection to the app: solid.github.io can't open the app

I thought the problem was caused due to the webview now showingthe popup instead of the webapp caused the lost connection, so I tried openning the popup in a browser but the same problem happened:

``` 
myWebView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {

                Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                startActivity(browserIntent);

                return true;
            }
        });
´´´

solid.github.io can't open the app through browser

After trying several libraries that manage popups, I can't find any solutions. Can anyone help?

0

There are 0 best solutions below