Comments (12)
Nice this works for me on the ionic 2 example
(<any>window).handleOpenURL = (url) => {
(<any>window).setTimeout(function () {
Auth0Cordova.onRedirectUri(url);
}, 100);
};
from auth0-cordova.
try adding timeout in window.handleOpenURL function, worked for me (then close the issue :))
window.handleOpenURL = function (url) {
window.setTimeout(function () {
PKCEClient.onRedirectUri(url);
}, 100);
}
from auth0-cordova.
this is the same issue as Issue 31, I was also unable to find a solution yet :(
from auth0-cordova.
@biemond timeout still doesn't help me. After auth0 login, the app crashes and restarts in Android. Whereas in iOS I get a white screen until I close and reopen the app.
from auth0-cordova.
it works for me on android and ios . are you also using the ionic 2 example?
from auth0-cordova.
Yes tried with that, can you share your package.json? I suspect it's some issue with the versions we have. Here's mine:
"dependencies": { "@angular/common": "4.1.0", "@angular/compiler": "4.1.0", "@angular/compiler-cli": "4.1.0", "@angular/core": "4.1.0", "@angular/forms": "4.1.0", "@angular/http": "4.1.0", "@angular/platform-browser": "4.1.0", "@angular/platform-browser-dynamic": "4.1.0", "@auth0/cordova": "^0.1.0", "@ionic-native/core": "3.6.1", "@ionic-native/network": "^3.10.3", "@ionic-native/splash-screen": "3.6.1", "@ionic-native/status-bar": "3.6.1", "@ionic/storage": "2.0.1", "angular2-jwt": "0.2.3", "auth0-js": "8.6.1", "cordova-android": "^6.2.3", "cordova-ios": "^4.4.0", "cordova-plugin-console": "1.0.5", "cordova-plugin-customurlscheme": "4.2.0", "cordova-plugin-device": "1.1.4", "cordova-plugin-network-information": "^1.3.3", "cordova-plugin-safariviewcontroller": "1.4.6", "cordova-plugin-splashscreen": "4.0.3", "cordova-plugin-statusbar": "2.2.3", "cordova-plugin-whitelist": "1.3.1", "cordova-sqlite-storage": "^2.0.4", "ionic-angular": "3.2.1", "ionic-plugin-keyboard": "2.2.1", "ionicons": "3.0.0", "moment": "^2.18.1", "rxjs": "5.1.1", "sw-toolbox": "3.6.0", "zone.js": "0.8.10" }, "devDependencies": { "@ionic/app-scripts": "1.3.7", "@ionic/cli-plugin-cordova": "1.1.2", "@ionic/cli-plugin-ionic-angular": "1.1.2", "typescript": "2.2.1" }
from auth0-cordova.
"dependencies": {
"@angular/common": "4.1.2",
"@angular/compiler": "4.1.2",
"@angular/compiler-cli": "4.1.2",
"@angular/core": "4.1.2",
"@angular/forms": "4.1.2",
"@angular/http": "4.1.2",
"@angular/platform-browser": "4.1.2",
"@angular/platform-browser-dynamic": "4.1.2",
"@ionic-native/core": "3.6.1",
"@ionic-native/splash-screen": "3.6.1",
"@ionic-native/status-bar": "3.6.1",
"@ionic/storage": "2.0.1",
"ionic-angular": "3.3.0",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.10",
"@auth0/cordova": "^0.1.0",
"@ionic-native/youtube-video-player": "^3.10.2",
"@ionic/cloud-angular": "^0.12.0",
"@ngx-translate/core": "^6.0.1",
"@ngx-translate/http-loader": "0.0.3",
"angular2-google-maps": "0.17.0",
"angular2-jwt": "0.2.3",
"auth0-js": "^8.6.1",
"cordova-android": "^6.2.3",
"cordova-ios": "~4.4.0",
"cordova-plugin-android-native-pdfviewer": "^1.2.0",
"cordova-plugin-compat": "~1.1.0",
"cordova-plugin-console": "~1.0.5",
"cordova-plugin-customurlscheme": "^4.2.0",
"cordova-plugin-device": "~1.1.3",
"cordova-plugin-file": "~4.3.0",
"cordova-plugin-google-analytics": "~1.7.11",
"cordova-plugin-googlemaps": "~1.4.0",
"cordova-plugin-inappbrowser": "~1.7.1",
"cordova-plugin-safariviewcontroller": "^1.4.7",
"cordova-plugin-splashscreen": "~4.0.1",
"cordova-plugin-statusbar": "~2.2.1",
"cordova-plugin-whitelist": "~1.3.1",
"cordova-sqlite-storage": "~2.0.2",
"es6-shim": "0.35.1",
"ionic": "3.1.2",
"ionic-plugin-keyboard": "~2.2.1",
"ngx-pagination": "^3.0.0",
"nl.kingsquare.cordova.background-audio": "~1.0.1",
"phonegap-plugin-push": "~1.10.2"
},
from auth0-cordova.
Thanks @biemond, tried your versions, but still no luck. I am downgrading to ionic 2 and checking out. Will post back in this thread if I find the issue!
from auth0-cordova.
for me its was already working with the demo ionic app and ionic 3 with lazy loading.
did you install these plugins + plus do the auth0 side
"cordova-plugin-safariviewcontroller": {},
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "YOUR_PACKAGE",
"ANDROID_SCHEME": "YOUR_PACKAGE",
"ANDROID_HOST": "xxxx.eu.auth0.com",
"ANDROID_PATHPREFIX": "/cordova/YOUR_PACKAGE/callback"
},
"cordova-plugin-inappbrowser": {},
and
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
<param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" />
</feature>
<engine name="android" spec="^6.2.3" />
<engine name="ios" spec="~4.4.0" />
from auth0-cordova.
The InAppBrowser was missing but even after including that the app is crashing, probably it's an issue specific to my configuration or so. Giving up for now :(
Again, thanks for checking this!
from auth0-cordova.
So this is the same problem I'm having right now?
When pressing login getting, redirect reopens the app instead of loggin in?
from auth0-cordova.
I'm facing similar issue with android cordova app. When I click on login button the Auth0Corodova function opens auth0 login page in OS browser. Once the OS browser opens our app is closed/crashed. There is no log why is it crashing. Sometime app crashes/closes immediately after OS browser open, sometime app crashes/closes after 5-10 secs. sometime app crashes/closes when authentication is done. Is there any solution?
I'm using
Android version 5.0.2
@auth0/cordova 0.3.0
cordova-plugin-customurlscheme 4.3.0 (tried 4.2.0)
cordova-plugin-safariviewcontroller 1.4.7 (tried 1.5.3)
cordova 7.1.0
cordova-android 6.3.0
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.