Coder Social home page Coder Social logo

Comments (4)

vmurin avatar vmurin commented on July 24, 2024

Take a look on the example:
https://github.com/vmurin/react-native-azure-auth-sample/blob/master/App.js#L59

from react-native-azure-auth.

oferRounds avatar oferRounds commented on July 24, 2024

Thank you!

Two questions please:

  1. Why is it that no token clean is done on Android (I mean on the module cache itself)?
  2. Don’t we need to call also: azureAuth.auth.cache.removeToken(token)?

from react-native-azure-auth.

oferRounds avatar oferRounds commented on July 24, 2024

Also, I’d like to do it silently, without the user seeing the webpage, is it possible?

from react-native-azure-auth.

vmurin avatar vmurin commented on July 24, 2024

We do not need to remove token from cache as it is always overwritten if the scope of the currently requested token ist the same or have intersection (inclusion). The expiration of any token is also handled. If expired, the token is refreshed and then the cache updated accordingly. So you will never get incorrect token from cache.
If you about "logout", so it is handled by Azure Cloud not by framework. After logout Azure invalidate the token, that could theoretically be valid and stay in cache. So you should properly implement login logic in your app and do not use acquireTokenSilent after logout. It means you have to save login state in the app as well.

from react-native-azure-auth.

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.