GithubHelp home page GithubHelp logo

Comments (7)

rolandoldengarm avatar rolandoldengarm commented on June 3, 2024 4

Hi @rohitnarula7176 thanks for the reply, sorry for replying to a closed ticket.
But I just want to be sure: The access token expires after one hour or so.
So the behavior I'm seeing is that after 1 hour, a user has to log in again as acquireTokenSilent will fail.

Is this expected behavior? Is it possible somehow to cache this? As I don't like the idea that people have to log in every time they open our app.

from microsoft-authentication-library-for-js.

igchuk avatar igchuk commented on June 3, 2024 3

I ended up doing everything manually, like constructing a url and opening a popup.

from microsoft-authentication-library-for-js.

wingleungchoi avatar wingleungchoi commented on June 3, 2024

@igaidai4uk i have the same problem.
Do you find a way to solve it?

from microsoft-authentication-library-for-js.

wingleungchoi avatar wingleungchoi commented on June 3, 2024

@igaidai4uk thanks, i will follow the document to do it manually
https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols-oauth-code

from microsoft-authentication-library-for-js.

rohitnarula7176 avatar rohitnarula7176 commented on June 3, 2024

@igaidai4uk @wingleungchoi The library uses implicit flow where refresh token are not supported. Closing this issue.

from microsoft-authentication-library-for-js.

DibranMulder avatar DibranMulder commented on June 3, 2024

@wingleungchoi @igaidai4uk Do you guys have sample code for refreshing the access tokens?
@rohitnarula7176 Are you planning to support refresh tokens anytime? Looks like a critical feature, in want kind of application do you want a user to login again after 1 hour?

from microsoft-authentication-library-for-js.

AAATechGuy avatar AAATechGuy commented on June 3, 2024

@DibranMulder @rolandoldengarm, I went into a confused path as well. In short, from what I understand, TokenCache in MSAL is the replacement/abstraction for refresh_token. You need to serialize/deserialize for later access.

Provided a bit more of my understanding here: https://stackoverflow.com/a/58482305/1578962

from microsoft-authentication-library-for-js.

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.