Comments (9)
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.
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.
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.
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.
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.
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.
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.
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.
Closing this one. Please ping if this is still an issue.
from auth0-cordova.
Related Issues (20)
- Handling errors in redirect uri HOT 1
- Capacitor support HOT 13
- onRedirectUri faulty behavior after first login HOT 8
- Module not found: Error: Can't resolve 'crypto' in 'C://mypc/path/node_module/@auth0\cordova\src' HOT 1
- Angular support HOT 4
- Login screen hangs after entering credentials HOT 9
- Refresh tokens HOT 6
- iOS social provider signout problem HOT 3
- Custom Webpack is not used when using livereload on cordova run HOT 6
- Sign in with Apple - error on callback HOT 22
- Universal and Deep link support for iOS and Android HOT 3
- Use ASWebAuthenticationSessionManager with cordova HOT 4
- New Version Release HOT 1
- Cannot read properties of undefined (reading 'open') HOT 1
- net: ERR_UNKNOWN_URL_SCHEME with targetSdkVersion 30 HOT 11
- loading icon keeps spinning after social sign in using ionic V3 app on Android
- Could not load module crypto HOT 3
- New Release? HOT 1
- Login with Google is not asking the account to use HOT 2
- SafariViewController Closes before user can save or update password HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth0-cordova.