Giter Club home page Giter Club logo

Comments (9)

brassier avatar brassier commented on June 3, 2024

I actually ran into this issue yesterday. For me, the problem was solved by making sure the Android device had the chrome browser installed and enabled. It didn't have to be the default browser, but it has to be available.

Hope it helps.

from auth0-cordova.

dtaalbers avatar dtaalbers commented on June 3, 2024

Thanks @brassier

I did that (updating chrome browser) on the device I have (that doesn't work) and I could finally log in. I asked one of my other customers to test the chrome update as well. He uses a different device (ACER tablet) with same android version but he already had its chrome browser up-to-date. Redirecting after logging in still does not work on his device. Sadly I can't expect all of my customers or future customers to update their browser. Is there a different solution for this issue that I can try?

module.exports = function getAgent(callback) {
    return BrowserAgent.isAvailable(function (available) {
        if (available) {
            // Here the app is using the SafariWebViewController.
            // when this is used the login & redirect works
            return callback(null, new BrowserAgent());
        }
        // When the SafariWebViewController is not available it falls back on the
        // Cordova InAppBrowser plugin which does not allow the redirection after logging in 
        return callback(null, new WebViewAgent());
    });
};

As you can see in my comments it falls back to the InAppBrowser on those specific devices. And when using the InAppBrowser redirecting after logging in fails. It it suppose to work normally when you work with InAppBrowser?

from auth0-cordova.

darkyen avatar darkyen commented on June 3, 2024

The BrowserAgent relies on SafariViewController Cordova Plugin, you'll need to ensure that your app is packaged with support for custom tabs explicitely for this to work https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller/wiki#to-use-with-chrome-custom-tabs-for-android

from auth0-cordova.

brassier avatar brassier commented on June 3, 2024

I have also had reports of 2 (out of ~400) Android users unable to log in. In their case they successfully log into Auth0, and it brings them back to the login page of the app (as opposed to the authenticated home page). They don't get an obvious error (e.g. ERR_UNKNOWN_URL_SCHEME), but that may be happening behind the scenes. I haven't been lucky enough to have a device that can recreate this.

So I agree that there seems to be some set of conditions where this cordova package won't allow logins in Android. Having Chrome enabled/updated may help some of these cases (but likely not all).

from auth0-cordova.

webbkvalite avatar webbkvalite commented on June 3, 2024

This problem reemerges in Cordova Android 7.
Immediately when trying to login the following is thrown:

 {"stack":"TypeError: Cannot call method 'isAvailable' of undefined\n at
            Function.Browser.isAvailable (http://192.168.2.226:8100/build/vendor.js:222233:31)\n at getAgent
            (http://192.168.2.226:8100/build/vendor.js:222212:23)\n at CordovaAuth.authorize
            (http://192.168.2.226:8100/build/vendor.js:138888:3)\n at AuthServiceNative.login
            (http://192.168.2.226:8100/build/main.js:6438:16)\n at SearchPage.login
            (http://192.168.2.226:8100/build/main.js:6748:19)\n at Object.eval [as handleEvent]
            (ng:///AppModule/SearchPage.ngfactory.js:37:23)\n at handleEvent
            (http://192.168.2.226:8100/build/vendor.js:12356:138)\n at callWithDebugContext
            (http://192.168.2.226:8100/build/vendor.js:13825:42)\n at Object.debugHandleEvent [as handleEvent]
            (http://192.168.2.226:8100/build/vendor.js:13413:12)\n at dispatchEvent
            (http://192.168.2.226:8100/build/vendor.js:8972:21)","message":"Cannot call method 'isAvailable' of
            undefined","ngDebugContext":{}}

from auth0-cordova.

arichbell avatar arichbell commented on June 3, 2024

We've run into an issue that sounds similar to this. We are working on reproducing the issue to get an error log, but.. Has anyone on this thread come up with any other solutions?

from auth0-cordova.

brassier avatar brassier commented on June 3, 2024

For me, these were tough to recreate. As noted above I was able to recreate one by uninstalling or disabling the Chrome browser. Another similar version is explained here: #74 In that case we've seen some antivirus scanners mess with the login via this Cordova path.

from auth0-cordova.

stale avatar stale commented on June 3, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

from auth0-cordova.

Widcket avatar Widcket commented on June 3, 2024

Closing this one. Please ping if this is still an issue.

from auth0-cordova.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.