Overview - I am working on a solution having UI built in angular and backend in django. I want to implement authentication and authorization using Azure AD. At UI, I have made use of @azure/msal-angular, which acquires access tokens directly from azure each time a backend enpoint is hit.
Problem 1 - Access tokens are acquired in the background and never expire unless user logs out. Is there a way to log user out after certain period of time/inactivity?
Problem 2 - @azure/msal-angular uses implicit grant flow which receives user tokens in url fragments, which seems not secure. Is auth code a better way to go about it?