Closed viganella closed 4 years ago
After 1 hour I get the error message ('user login is required'). I have 'keep my signed in option enabled'. My localstorage:
I have investigated further here and what seems to have caused that is because on refresh I was loosing (this_user <-null), so that after 1 hour Adal was requesting for a fresh log-in. This is not ok of course, since I should not loose user after he refreshes, it is just very unreliable.
Following up I actually am calling this.get('session')._context.getCachedUser(); ON page REFRESH which will actually set again the user from idtoken.
We are having same error, what is the resolution for this? We are calling getCachedUser() on page refresh as well. Still having the issue of token not renewing
Can also reproduce this bug. Can confirm it is related to this._user beeing null after a page reload. Will submit a PR with fix asap
Please check documentation on token renewal here. All tokens expire after an hour, but calling acquireTokenSilent()
in the background before the token expiry renews the token.
All current authentication work from microsoft is delivered through msal js
library here. adal js
is still supported only for security fixes. We would recommend to move to msal js
for any advanced feature asks.
So, after 1.5 years this issue is closed with a link to how to do the asked thing in msal. Thus: for all intents and purposes adal.js is deprecated?
Could you please state this clearly in the readme?
Yes, we will soon. We are trying to figure out usage issues vs feature asks and will add the documentation soon.
Hi When reading adal documentation I saw that when user authenticates to AAD they have an access_token and a refresh token (that can renew acccess_token for up to 90 days). I have an application that uses websocket connection to get data from cloud and after 1 hour letting it run I get 'access_token_expired ' message. My question is that, is there anything special i have to do to let user stay logged-in for a longer period of time e.g. for days ? Or is this another bug?