I want to integrate with Miscrosoft Outlook. I am able to login with MSAL.js and get an access token, but I am not able to get a refresh token. Is there a way to do it?
@igaidai4uk i have the same problem.
Do you find a way to solve it?
I ended up doing everything manually, like constructing a url and opening a popup.
@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
@igaidai4uk @wingleungchoi The library uses implicit flow where refresh token are not supported. Closing this issue.
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.
@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?
@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
Most helpful comment
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
acquireTokenSilentwill 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.