Giter Club home page Giter Club logo

Comments (4)

gregor-srdic avatar gregor-srdic commented on June 14, 2024 2

Plugins only run on cordova platforms (native builds), none of the desktop browsers will have access to them. (There is a platform "browser" in ionic, but I don't think that will be useful in your case.)

To test your "login code" on the device, you have to connect your device to the development machine and run "ionic run android/ios" command. You can also use simulator/emulator on both platforms.

For testing other features (that require login) you can store the access token in local storage on mobile and copy it to your chrome browser. Authentication flow usually first checks for the stored token and if available, user is immediately authenticated.
Or you can develop a separate authorisation flow if the app is running in a desktop browser - if you intend to put it on web also - we do it this way.

from auth0-cordova.

darkyen avatar darkyen commented on June 14, 2024

You'll need to installs the plugins as listed in the readme and this works for ionic 2. However, this will not work when testing in Chrome as the plugins are not available.

from auth0-cordova.

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

We are using this for the ionic project (v1 actually, but in v2 it would be the same), that is both a web and mobile application (ios and android). This library is used for native applications, while for the web we use auth0.js client alone.

You have to add this "strange" url to the list of allowed callback urls, and when you install the plugins, Android/iOs will know to redirect the callback back to your app.

Not sure if you are aware, there is actually an example done with Ionic v2 in this repo https://github.com/auth0/auth0-cordova/tree/master/example/ionic

from auth0-cordova.

bujardeari avatar bujardeari commented on June 14, 2024

Thank you both!
Yes i am aware of the Ionic example in this repo but i was confused which readme to use, the one on the root page of the repo or the one at the ionic example. Gregor if you use this pluggins, how do you work in dev mode if this is not working when testing in the computer browser? Or is it only on Chrome it doesnt work?

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.