The azure user session lifetime

那年仲夏 提交于 2019-12-11 02:45:54

问题


I successully using azure ad account to login my app with openid connect , but my user will logout after 1 hour. I haven't find code to set the session expire time in my code , any document explain that? Any how could i extend the session active time?


回答1:


I haven't find code to set the session expire time in my code , any document explain that?

Please refer to this link :http://www.cloudidentity.com/blog/2016/07/25/controlling-a-web-apps-session-duration-2/

By default, in ASP.NET 4.6 the amount of time for which this session is matches the validity timeframe of the token that prompted the generation of the session in the first place. Say that you are using the OIDC MW with Azure AD: the id_token received by the app during the user authentication transaction will last one hour, hence the session cookie for your app will also last 1 hour.

To extend the duration of your session , you could add a hidden iframe in the web app, which hits the new “forced” sign in route at regular time intervals , please refer to the code sample in above aritcle .




回答2:


You can configurable token lifetimes in Azure Active Directory using some PowerShell cmdlets from the AzureAD module.



来源:https://stackoverflow.com/questions/43388851/the-azure-user-session-lifetime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!