Giter Club home page Giter Club logo

Comments (8)

sgrebnov avatar sgrebnov commented on June 15, 2024

Hey @Dismissile, pls clarify the following so that I can investigate this

  1. ADAL plugin version you are using
  2. Target Cordova platform (iOS, Android or Windows)
  3. Are you testing on real device or emulator

PS. May be related to
#54 (comment)
#47

from azure-activedirectory-library-for-cordova.

Dismissile avatar Dismissile commented on June 15, 2024
  1. cordova-plugin-ms-adal 0.6.3-dev
  2. Android
  3. Real Device - Samsung Galaxy S4

from azure-activedirectory-library-for-cordova.

sgrebnov avatar sgrebnov commented on June 15, 2024

Pls let me know Android version installed on Samsung device. (Looks like we see related issue on devices with Android OS 4.2 and below)

from azure-activedirectory-library-for-cordova.

Dismissile avatar Dismissile commented on June 15, 2024

It's Android 5.0.1 Lollipop.

from azure-activedirectory-library-for-cordova.

sgrebnov avatar sgrebnov commented on June 15, 2024

I've tested plugin on Android L and see that refresh token is returned from server and persisted on device (and then used to update token if I call acquireTokenSilentAsync), but it is NOT exposed to JS as authenticationResultToJSON contains strict list of what should be exposed back (as per spec).

Recommendation here is to call authContext.acquireTokenSilentAsync which should return updated token based on refresh token so you don't need to do any extra work. See example on home page for more details.

@Dismissile, feel free to re-open this issue if you still have any problem.

from azure-activedirectory-library-for-cordova.

Ahmadre avatar Ahmadre commented on June 15, 2024

@sgrebnov But what about beeing able to save my session or login forever? For that you have to encrypt the refresh-token, save it to your device and reuse it, if the user openes the App AFTER an hour! For that reason: we definetly need the reftesh token!

Please answer my question asap.

Thank you so much.
Rebar

from azure-activedirectory-library-for-cordova.

sgrebnov avatar sgrebnov commented on June 15, 2024

@Ahmadre - that makes sense, but could you please elaborate why you want to do this manually (including encryption) instead of using special method provided by api - acquireTokenSilentAsync

from azure-activedirectory-library-for-cordova.

Ahmadre avatar Ahmadre commented on June 15, 2024

@sgrebnov Because I can't use that method, when the mobile phone is on airplane or battery is empty, or or or. And no I definetly don't want to use Background processes, because it sucks too much battery life and while said: if the smartphone is offline: there's no chance to refresh and the accessToken will expire. Or can I use the silent method instead of an expired accessToken?

from azure-activedirectory-library-for-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.