Coder Social home page Coder Social logo

Comments (12)

biemond avatar biemond commented on June 19, 2024 2

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.

gregor-srdic avatar gregor-srdic commented on June 19, 2024 1

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.

gregor-srdic avatar gregor-srdic commented on June 19, 2024

this is the same issue as Issue 31, I was also unable to find a solution yet :(

from auth0-cordova.

cyberabis avatar cyberabis commented on June 19, 2024

@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.

biemond avatar biemond commented on June 19, 2024

it works for me on android and ios . are you also using the ionic 2 example?

from auth0-cordova.

cyberabis avatar cyberabis commented on June 19, 2024

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.

biemond avatar biemond commented on June 19, 2024
  "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.

cyberabis avatar cyberabis commented on June 19, 2024

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.

biemond avatar biemond commented on June 19, 2024

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.

cyberabis avatar cyberabis commented on June 19, 2024

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.

nathantaal avatar nathantaal commented on June 19, 2024

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.

niren777 avatar niren777 commented on June 19, 2024

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)

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.